{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "name": "02143.ipynb",
      "provenance": [],
      "include_colab_link": true
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    },
    "accelerator": "GPU"
  },
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "view-in-github",
        "colab_type": "text"
      },
      "source": [
        "<a href=\"https://colab.research.google.com/github/yananma/5_programs_per_day/blob/master/02143.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "ZAOoiLTrEJKf",
        "colab_type": "text"
      },
      "source": [
        "## 7.2 梯度下降和随机梯度下降"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "qklkZRb2E5kn",
        "colab_type": "text"
      },
      "source": [
        "### 7.2.1 一维梯度下降"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "2nanmUBOFBxO",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "%matplotlib inline \n",
        "import numpy as np \n",
        "import torch \n",
        "import math \n",
        "import d2l "
      ],
      "execution_count": 0,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "mksA7AiCpr53",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 34
        },
        "outputId": "c5887d49-e64c-4dac-8f8e-fb3015afa3f3"
      },
      "source": [
        "def gd(eta):\n",
        "    x = 10 \n",
        "    results = [x]\n",
        "    for i in range(10):\n",
        "        x -= eta * 2 * x\n",
        "        results.append(x)\n",
        "    print('epoch 10, x:', x)\n",
        "    return results \n",
        "\n",
        "res = gd(0.2)"
      ],
      "execution_count": 3,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "epoch 10, x: 0.06046617599999997\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "xQdSNzGbqZ3j",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 261
        },
        "outputId": "b8348c06-9e4c-409e-b82d-ba599ec8df76"
      },
      "source": [
        "def show_trace(res):\n",
        "    n = max(abs(min(res)), abs(max(res)), 10)\n",
        "    f_line = np.arange(-n, n, 0.1)\n",
        "    d2l.set_figsize()\n",
        "    d2l.plt.plot(f_line, [x * x for x in f_line])\n",
        "    d2l.plt.plot(res, [x * x for x in res], '-o')\n",
        "    d2l.plt.xlabel('x')\n",
        "    d2l.plt.ylabel('f(x)')\n",
        "\n",
        "show_trace(res)"
      ],
      "execution_count": 4,
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 252x180 with 1 Axes>"
            ],
            "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (https://matplotlib.org/) -->\n<svg height=\"180.65625pt\" version=\"1.1\" viewBox=\"0 0 249.465625 180.65625\" width=\"249.465625pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n  <style type=\"text/css\">\n*{stroke-linecap:butt;stroke-linejoin:round;}\n  </style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M 0 180.65625 \nL 249.465625 180.65625 \nL 249.465625 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"patch_2\">\n    <path d=\"M 46.965625 143.1 \nL 242.265625 143.1 \nL 242.265625 7.2 \nL 46.965625 7.2 \nz\n\" style=\"fill:#ffffff;\"/>\n   </g>\n   <g id=\"matplotlib.axis_1\">\n    <g id=\"xtick_1\">\n     <g id=\"line2d_1\">\n      <defs>\n       <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"m447f887974\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"55.842898\" xlink:href=\"#m447f887974\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_1\">\n      <!-- −10 -->\n      <defs>\n       <path d=\"M 10.59375 35.5 \nL 73.1875 35.5 \nL 73.1875 27.203125 \nL 10.59375 27.203125 \nz\n\" id=\"DejaVuSans-8722\"/>\n       <path d=\"M 12.40625 8.296875 \nL 28.515625 8.296875 \nL 28.515625 63.921875 \nL 10.984375 60.40625 \nL 10.984375 69.390625 \nL 28.421875 72.90625 \nL 38.28125 72.90625 \nL 38.28125 8.296875 \nL 54.390625 8.296875 \nL 54.390625 0 \nL 12.40625 0 \nz\n\" id=\"DejaVuSans-49\"/>\n       <path d=\"M 31.78125 66.40625 \nQ 24.171875 66.40625 20.328125 58.90625 \nQ 16.5 51.421875 16.5 36.375 \nQ 16.5 21.390625 20.328125 13.890625 \nQ 24.171875 6.390625 31.78125 6.390625 \nQ 39.453125 6.390625 43.28125 13.890625 \nQ 47.125 21.390625 47.125 36.375 \nQ 47.125 51.421875 43.28125 58.90625 \nQ 39.453125 66.40625 31.78125 66.40625 \nz\nM 31.78125 74.21875 \nQ 44.046875 74.21875 50.515625 64.515625 \nQ 56.984375 54.828125 56.984375 36.375 \nQ 56.984375 17.96875 50.515625 8.265625 \nQ 44.046875 -1.421875 31.78125 -1.421875 \nQ 19.53125 -1.421875 13.0625 8.265625 \nQ 6.59375 17.96875 6.59375 36.375 \nQ 6.59375 54.828125 13.0625 64.515625 \nQ 19.53125 74.21875 31.78125 74.21875 \nz\n\" id=\"DejaVuSans-48\"/>\n      </defs>\n      <g transform=\"translate(45.290554 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"147.412109\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_2\">\n     <g id=\"line2d_2\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"100.229261\" xlink:href=\"#m447f887974\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_2\">\n      <!-- −5 -->\n      <defs>\n       <path d=\"M 10.796875 72.90625 \nL 49.515625 72.90625 \nL 49.515625 64.59375 \nL 19.828125 64.59375 \nL 19.828125 46.734375 \nQ 21.96875 47.46875 24.109375 47.828125 \nQ 26.265625 48.1875 28.421875 48.1875 \nQ 40.625 48.1875 47.75 41.5 \nQ 54.890625 34.8125 54.890625 23.390625 \nQ 54.890625 11.625 47.5625 5.09375 \nQ 40.234375 -1.421875 26.90625 -1.421875 \nQ 22.3125 -1.421875 17.546875 -0.640625 \nQ 12.796875 0.140625 7.71875 1.703125 \nL 7.71875 11.625 \nQ 12.109375 9.234375 16.796875 8.0625 \nQ 21.484375 6.890625 26.703125 6.890625 \nQ 35.15625 6.890625 40.078125 11.328125 \nQ 45.015625 15.765625 45.015625 23.390625 \nQ 45.015625 31 40.078125 35.4375 \nQ 35.15625 39.890625 26.703125 39.890625 \nQ 22.75 39.890625 18.8125 39.015625 \nQ 14.890625 38.140625 10.796875 36.28125 \nz\n\" id=\"DejaVuSans-53\"/>\n      </defs>\n      <g transform=\"translate(92.858168 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_3\">\n     <g id=\"line2d_3\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"144.615625\" xlink:href=\"#m447f887974\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_3\">\n      <!-- 0 -->\n      <g transform=\"translate(141.434375 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_4\">\n     <g id=\"line2d_4\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"189.001989\" xlink:href=\"#m447f887974\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_4\">\n      <!-- 5 -->\n      <g transform=\"translate(185.820739 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_5\">\n     <g id=\"line2d_5\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"233.388352\" xlink:href=\"#m447f887974\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_5\">\n      <!-- 10 -->\n      <g transform=\"translate(227.025852 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_6\">\n     <!-- x -->\n     <defs>\n      <path d=\"M 54.890625 54.6875 \nL 35.109375 28.078125 \nL 55.90625 0 \nL 45.3125 0 \nL 29.390625 21.484375 \nL 13.484375 0 \nL 2.875 0 \nL 24.125 28.609375 \nL 4.6875 54.6875 \nL 15.28125 54.6875 \nL 29.78125 35.203125 \nL 44.28125 54.6875 \nz\n\" id=\"DejaVuSans-120\"/>\n     </defs>\n     <g transform=\"translate(141.65625 171.376563)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-120\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"matplotlib.axis_2\">\n    <g id=\"ytick_1\">\n     <g id=\"line2d_6\">\n      <defs>\n       <path d=\"M 0 0 \nL -3.5 0 \n\" id=\"m8df2028885\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"46.965625\" xlink:href=\"#m8df2028885\" y=\"136.922727\"/>\n      </g>\n     </g>\n     <g id=\"text_7\">\n      <!-- 0 -->\n      <g transform=\"translate(33.603125 140.721946)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_2\">\n     <g id=\"line2d_7\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"46.965625\" xlink:href=\"#m8df2028885\" y=\"112.213636\"/>\n      </g>\n     </g>\n     <g id=\"text_8\">\n      <!-- 20 -->\n      <defs>\n       <path d=\"M 19.1875 8.296875 \nL 53.609375 8.296875 \nL 53.609375 0 \nL 7.328125 0 \nL 7.328125 8.296875 \nQ 12.9375 14.109375 22.625 23.890625 \nQ 32.328125 33.6875 34.8125 36.53125 \nQ 39.546875 41.84375 41.421875 45.53125 \nQ 43.3125 49.21875 43.3125 52.78125 \nQ 43.3125 58.59375 39.234375 62.25 \nQ 35.15625 65.921875 28.609375 65.921875 \nQ 23.96875 65.921875 18.8125 64.3125 \nQ 13.671875 62.703125 7.8125 59.421875 \nL 7.8125 69.390625 \nQ 13.765625 71.78125 18.9375 73 \nQ 24.125 74.21875 28.421875 74.21875 \nQ 39.75 74.21875 46.484375 68.546875 \nQ 53.21875 62.890625 53.21875 53.421875 \nQ 53.21875 48.921875 51.53125 44.890625 \nQ 49.859375 40.875 45.40625 35.40625 \nQ 44.1875 33.984375 37.640625 27.21875 \nQ 31.109375 20.453125 19.1875 8.296875 \nz\n\" id=\"DejaVuSans-50\"/>\n      </defs>\n      <g transform=\"translate(27.240625 116.012855)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_3\">\n     <g id=\"line2d_8\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"46.965625\" xlink:href=\"#m8df2028885\" y=\"87.504545\"/>\n      </g>\n     </g>\n     <g id=\"text_9\">\n      <!-- 40 -->\n      <defs>\n       <path d=\"M 37.796875 64.3125 \nL 12.890625 25.390625 \nL 37.796875 25.390625 \nz\nM 35.203125 72.90625 \nL 47.609375 72.90625 \nL 47.609375 25.390625 \nL 58.015625 25.390625 \nL 58.015625 17.1875 \nL 47.609375 17.1875 \nL 47.609375 0 \nL 37.796875 0 \nL 37.796875 17.1875 \nL 4.890625 17.1875 \nL 4.890625 26.703125 \nz\n\" id=\"DejaVuSans-52\"/>\n      </defs>\n      <g transform=\"translate(27.240625 91.303764)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_4\">\n     <g id=\"line2d_9\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"46.965625\" xlink:href=\"#m8df2028885\" y=\"62.795455\"/>\n      </g>\n     </g>\n     <g id=\"text_10\">\n      <!-- 60 -->\n      <defs>\n       <path d=\"M 33.015625 40.375 \nQ 26.375 40.375 22.484375 35.828125 \nQ 18.609375 31.296875 18.609375 23.390625 \nQ 18.609375 15.53125 22.484375 10.953125 \nQ 26.375 6.390625 33.015625 6.390625 \nQ 39.65625 6.390625 43.53125 10.953125 \nQ 47.40625 15.53125 47.40625 23.390625 \nQ 47.40625 31.296875 43.53125 35.828125 \nQ 39.65625 40.375 33.015625 40.375 \nz\nM 52.59375 71.296875 \nL 52.59375 62.3125 \nQ 48.875 64.0625 45.09375 64.984375 \nQ 41.3125 65.921875 37.59375 65.921875 \nQ 27.828125 65.921875 22.671875 59.328125 \nQ 17.53125 52.734375 16.796875 39.40625 \nQ 19.671875 43.65625 24.015625 45.921875 \nQ 28.375 48.1875 33.59375 48.1875 \nQ 44.578125 48.1875 50.953125 41.515625 \nQ 57.328125 34.859375 57.328125 23.390625 \nQ 57.328125 12.15625 50.6875 5.359375 \nQ 44.046875 -1.421875 33.015625 -1.421875 \nQ 20.359375 -1.421875 13.671875 8.265625 \nQ 6.984375 17.96875 6.984375 36.375 \nQ 6.984375 53.65625 15.1875 63.9375 \nQ 23.390625 74.21875 37.203125 74.21875 \nQ 40.921875 74.21875 44.703125 73.484375 \nQ 48.484375 72.75 52.59375 71.296875 \nz\n\" id=\"DejaVuSans-54\"/>\n      </defs>\n      <g transform=\"translate(27.240625 66.594673)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-54\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_5\">\n     <g id=\"line2d_10\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"46.965625\" xlink:href=\"#m8df2028885\" y=\"38.086364\"/>\n      </g>\n     </g>\n     <g id=\"text_11\">\n      <!-- 80 -->\n      <defs>\n       <path d=\"M 31.78125 34.625 \nQ 24.75 34.625 20.71875 30.859375 \nQ 16.703125 27.09375 16.703125 20.515625 \nQ 16.703125 13.921875 20.71875 10.15625 \nQ 24.75 6.390625 31.78125 6.390625 \nQ 38.8125 6.390625 42.859375 10.171875 \nQ 46.921875 13.96875 46.921875 20.515625 \nQ 46.921875 27.09375 42.890625 30.859375 \nQ 38.875 34.625 31.78125 34.625 \nz\nM 21.921875 38.8125 \nQ 15.578125 40.375 12.03125 44.71875 \nQ 8.5 49.078125 8.5 55.328125 \nQ 8.5 64.0625 14.71875 69.140625 \nQ 20.953125 74.21875 31.78125 74.21875 \nQ 42.671875 74.21875 48.875 69.140625 \nQ 55.078125 64.0625 55.078125 55.328125 \nQ 55.078125 49.078125 51.53125 44.71875 \nQ 48 40.375 41.703125 38.8125 \nQ 48.828125 37.15625 52.796875 32.3125 \nQ 56.78125 27.484375 56.78125 20.515625 \nQ 56.78125 9.90625 50.3125 4.234375 \nQ 43.84375 -1.421875 31.78125 -1.421875 \nQ 19.734375 -1.421875 13.25 4.234375 \nQ 6.78125 9.90625 6.78125 20.515625 \nQ 6.78125 27.484375 10.78125 32.3125 \nQ 14.796875 37.15625 21.921875 38.8125 \nz\nM 18.3125 54.390625 \nQ 18.3125 48.734375 21.84375 45.5625 \nQ 25.390625 42.390625 31.78125 42.390625 \nQ 38.140625 42.390625 41.71875 45.5625 \nQ 45.3125 48.734375 45.3125 54.390625 \nQ 45.3125 60.0625 41.71875 63.234375 \nQ 38.140625 66.40625 31.78125 66.40625 \nQ 25.390625 66.40625 21.84375 63.234375 \nQ 18.3125 60.0625 18.3125 54.390625 \nz\n\" id=\"DejaVuSans-56\"/>\n      </defs>\n      <g transform=\"translate(27.240625 41.885582)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-56\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_6\">\n     <g id=\"line2d_11\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"46.965625\" xlink:href=\"#m8df2028885\" y=\"13.377273\"/>\n      </g>\n     </g>\n     <g id=\"text_12\">\n      <!-- 100 -->\n      <g transform=\"translate(20.878125 17.176491)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"127.246094\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_13\">\n     <!-- f(x) -->\n     <defs>\n      <path d=\"M 37.109375 75.984375 \nL 37.109375 68.5 \nL 28.515625 68.5 \nQ 23.6875 68.5 21.796875 66.546875 \nQ 19.921875 64.59375 19.921875 59.515625 \nL 19.921875 54.6875 \nL 34.71875 54.6875 \nL 34.71875 47.703125 \nL 19.921875 47.703125 \nL 19.921875 0 \nL 10.890625 0 \nL 10.890625 47.703125 \nL 2.296875 47.703125 \nL 2.296875 54.6875 \nL 10.890625 54.6875 \nL 10.890625 58.5 \nQ 10.890625 67.625 15.140625 71.796875 \nQ 19.390625 75.984375 28.609375 75.984375 \nz\n\" id=\"DejaVuSans-102\"/>\n      <path d=\"M 31 75.875 \nQ 24.46875 64.65625 21.28125 53.65625 \nQ 18.109375 42.671875 18.109375 31.390625 \nQ 18.109375 20.125 21.3125 9.0625 \nQ 24.515625 -2 31 -13.1875 \nL 23.1875 -13.1875 \nQ 15.875 -1.703125 12.234375 9.375 \nQ 8.59375 20.453125 8.59375 31.390625 \nQ 8.59375 42.28125 12.203125 53.3125 \nQ 15.828125 64.359375 23.1875 75.875 \nz\n\" id=\"DejaVuSans-40\"/>\n      <path d=\"M 8.015625 75.875 \nL 15.828125 75.875 \nQ 23.140625 64.359375 26.78125 53.3125 \nQ 30.421875 42.28125 30.421875 31.390625 \nQ 30.421875 20.453125 26.78125 9.375 \nQ 23.140625 -1.703125 15.828125 -13.1875 \nL 8.015625 -13.1875 \nQ 14.5 -2 17.703125 9.0625 \nQ 20.90625 20.125 20.90625 31.390625 \nQ 20.90625 42.671875 17.703125 53.65625 \nQ 14.5 64.65625 8.015625 75.875 \nz\n\" id=\"DejaVuSans-41\"/>\n     </defs>\n     <g transform=\"translate(14.798438 83.771094)rotate(-90)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-102\"/>\n      <use x=\"35.205078\" xlink:href=\"#DejaVuSans-40\"/>\n      <use x=\"74.21875\" xlink:href=\"#DejaVuSans-120\"/>\n      <use x=\"133.398438\" xlink:href=\"#DejaVuSans-41\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"line2d_12\">\n    <path clip-path=\"url(#p676ac43bcb)\" d=\"M 55.842898 13.377273 \nL 60.281534 25.422955 \nL 64.72017 36.850909 \nL 69.158807 47.661136 \nL 73.597443 57.853636 \nL 78.03608 67.428409 \nL 82.474716 76.385455 \nL 86.025625 83.106327 \nL 89.576534 89.431855 \nL 93.127443 95.362036 \nL 96.678352 100.896873 \nL 100.229261 106.036364 \nL 103.78017 110.780509 \nL 107.33108 115.129309 \nL 110.881989 119.082764 \nL 114.432898 122.640873 \nL 117.983807 125.803636 \nL 120.646989 127.916264 \nL 123.31017 129.806509 \nL 125.973352 131.474373 \nL 128.636534 132.919855 \nL 131.299716 134.142955 \nL 133.962898 135.143673 \nL 136.62608 135.922009 \nL 139.289261 136.477964 \nL 141.952443 136.811536 \nL 144.615625 136.922727 \nL 147.278807 136.811536 \nL 149.941989 136.477964 \nL 152.60517 135.922009 \nL 155.268352 135.143673 \nL 157.931534 134.142955 \nL 160.594716 132.919855 \nL 163.257898 131.474373 \nL 165.92108 129.806509 \nL 168.584261 127.916264 \nL 171.247443 125.803636 \nL 173.910625 123.468627 \nL 177.461534 120.009355 \nL 181.012443 116.154736 \nL 184.563352 111.904773 \nL 188.114261 107.259464 \nL 191.66517 102.218809 \nL 195.21608 96.782809 \nL 198.766989 90.951464 \nL 202.317898 84.724773 \nL 205.868807 78.102736 \nL 209.419716 71.085355 \nL 213.858352 61.757673 \nL 218.296989 51.812264 \nL 222.735625 41.249127 \nL 227.174261 30.068264 \nL 231.612898 18.269673 \nL 232.500625 15.835827 \nL 232.500625 15.835827 \n\" style=\"fill:none;stroke:#1f77b4;stroke-linecap:square;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"line2d_13\">\n    <path clip-path=\"url(#p676ac43bcb)\" d=\"M 233.388352 13.377273 \nL 197.879261 92.446364 \nL 176.573807 120.911236 \nL 163.790534 131.158591 \nL 156.12057 134.847638 \nL 151.518592 136.175695 \nL 148.757405 136.653796 \nL 147.100693 136.825912 \nL 146.106666 136.887874 \nL 145.51025 136.91018 \nL 145.1524 136.91821 \n\" style=\"fill:none;stroke:#ff7f0e;stroke-linecap:square;stroke-width:1.5;\"/>\n    <defs>\n     <path d=\"M 0 3 \nC 0.795609 3 1.55874 2.683901 2.12132 2.12132 \nC 2.683901 1.55874 3 0.795609 3 0 \nC 3 -0.795609 2.683901 -1.55874 2.12132 -2.12132 \nC 1.55874 -2.683901 0.795609 -3 0 -3 \nC -0.795609 -3 -1.55874 -2.683901 -2.12132 -2.12132 \nC -2.683901 -1.55874 -3 -0.795609 -3 0 \nC -3 0.795609 -2.683901 1.55874 -2.12132 2.12132 \nC -1.55874 2.683901 -0.795609 3 0 3 \nz\n\" id=\"m81aaa6c761\" style=\"stroke:#ff7f0e;\"/>\n    </defs>\n    <g clip-path=\"url(#p676ac43bcb)\">\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"233.388352\" xlink:href=\"#m81aaa6c761\" y=\"13.377273\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"197.879261\" xlink:href=\"#m81aaa6c761\" y=\"92.446364\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"176.573807\" xlink:href=\"#m81aaa6c761\" y=\"120.911236\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"163.790534\" xlink:href=\"#m81aaa6c761\" y=\"131.158591\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"156.12057\" xlink:href=\"#m81aaa6c761\" y=\"134.847638\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"151.518592\" xlink:href=\"#m81aaa6c761\" y=\"136.175695\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"148.757405\" xlink:href=\"#m81aaa6c761\" y=\"136.653796\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"147.100693\" xlink:href=\"#m81aaa6c761\" y=\"136.825912\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"146.106666\" xlink:href=\"#m81aaa6c761\" y=\"136.887874\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"145.51025\" xlink:href=\"#m81aaa6c761\" y=\"136.91018\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"145.1524\" xlink:href=\"#m81aaa6c761\" y=\"136.91821\"/>\n    </g>\n   </g>\n   <g id=\"patch_3\">\n    <path d=\"M 46.965625 143.1 \nL 46.965625 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_4\">\n    <path d=\"M 242.265625 143.1 \nL 242.265625 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_5\">\n    <path d=\"M 46.965625 143.1 \nL 242.265625 143.1 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_6\">\n    <path d=\"M 46.965625 7.2 \nL 242.265625 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"p676ac43bcb\">\n   <rect height=\"135.9\" width=\"195.3\" x=\"46.965625\" y=\"7.2\"/>\n  </clipPath>\n </defs>\n</svg>\n"
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "mmx-ViQQrCNC",
        "colab_type": "text"
      },
      "source": [
        "### 7.2.2 学习率"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "DjPx6B5zrMhz",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 278
        },
        "outputId": "ddc26de8-4099-45a4-d3d0-1dc8663dbed9"
      },
      "source": [
        "show_trace(gd(0.05))"
      ],
      "execution_count": 5,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "epoch 10, x: 3.4867844009999995\n"
          ],
          "name": "stdout"
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 252x180 with 1 Axes>"
            ],
            "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (https://matplotlib.org/) -->\n<svg height=\"180.65625pt\" version=\"1.1\" viewBox=\"0 0 249.465625 180.65625\" width=\"249.465625pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n  <style type=\"text/css\">\n*{stroke-linecap:butt;stroke-linejoin:round;}\n  </style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M 0 180.65625 \nL 249.465625 180.65625 \nL 249.465625 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"patch_2\">\n    <path d=\"M 46.965625 143.1 \nL 242.265625 143.1 \nL 242.265625 7.2 \nL 46.965625 7.2 \nz\n\" style=\"fill:#ffffff;\"/>\n   </g>\n   <g id=\"matplotlib.axis_1\">\n    <g id=\"xtick_1\">\n     <g id=\"line2d_1\">\n      <defs>\n       <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"m1913da21f1\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"55.842898\" xlink:href=\"#m1913da21f1\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_1\">\n      <!-- −10 -->\n      <defs>\n       <path d=\"M 10.59375 35.5 \nL 73.1875 35.5 \nL 73.1875 27.203125 \nL 10.59375 27.203125 \nz\n\" id=\"DejaVuSans-8722\"/>\n       <path d=\"M 12.40625 8.296875 \nL 28.515625 8.296875 \nL 28.515625 63.921875 \nL 10.984375 60.40625 \nL 10.984375 69.390625 \nL 28.421875 72.90625 \nL 38.28125 72.90625 \nL 38.28125 8.296875 \nL 54.390625 8.296875 \nL 54.390625 0 \nL 12.40625 0 \nz\n\" id=\"DejaVuSans-49\"/>\n       <path d=\"M 31.78125 66.40625 \nQ 24.171875 66.40625 20.328125 58.90625 \nQ 16.5 51.421875 16.5 36.375 \nQ 16.5 21.390625 20.328125 13.890625 \nQ 24.171875 6.390625 31.78125 6.390625 \nQ 39.453125 6.390625 43.28125 13.890625 \nQ 47.125 21.390625 47.125 36.375 \nQ 47.125 51.421875 43.28125 58.90625 \nQ 39.453125 66.40625 31.78125 66.40625 \nz\nM 31.78125 74.21875 \nQ 44.046875 74.21875 50.515625 64.515625 \nQ 56.984375 54.828125 56.984375 36.375 \nQ 56.984375 17.96875 50.515625 8.265625 \nQ 44.046875 -1.421875 31.78125 -1.421875 \nQ 19.53125 -1.421875 13.0625 8.265625 \nQ 6.59375 17.96875 6.59375 36.375 \nQ 6.59375 54.828125 13.0625 64.515625 \nQ 19.53125 74.21875 31.78125 74.21875 \nz\n\" id=\"DejaVuSans-48\"/>\n      </defs>\n      <g transform=\"translate(45.290554 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"147.412109\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_2\">\n     <g id=\"line2d_2\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"100.229261\" xlink:href=\"#m1913da21f1\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_2\">\n      <!-- −5 -->\n      <defs>\n       <path d=\"M 10.796875 72.90625 \nL 49.515625 72.90625 \nL 49.515625 64.59375 \nL 19.828125 64.59375 \nL 19.828125 46.734375 \nQ 21.96875 47.46875 24.109375 47.828125 \nQ 26.265625 48.1875 28.421875 48.1875 \nQ 40.625 48.1875 47.75 41.5 \nQ 54.890625 34.8125 54.890625 23.390625 \nQ 54.890625 11.625 47.5625 5.09375 \nQ 40.234375 -1.421875 26.90625 -1.421875 \nQ 22.3125 -1.421875 17.546875 -0.640625 \nQ 12.796875 0.140625 7.71875 1.703125 \nL 7.71875 11.625 \nQ 12.109375 9.234375 16.796875 8.0625 \nQ 21.484375 6.890625 26.703125 6.890625 \nQ 35.15625 6.890625 40.078125 11.328125 \nQ 45.015625 15.765625 45.015625 23.390625 \nQ 45.015625 31 40.078125 35.4375 \nQ 35.15625 39.890625 26.703125 39.890625 \nQ 22.75 39.890625 18.8125 39.015625 \nQ 14.890625 38.140625 10.796875 36.28125 \nz\n\" id=\"DejaVuSans-53\"/>\n      </defs>\n      <g transform=\"translate(92.858168 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_3\">\n     <g id=\"line2d_3\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"144.615625\" xlink:href=\"#m1913da21f1\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_3\">\n      <!-- 0 -->\n      <g transform=\"translate(141.434375 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_4\">\n     <g id=\"line2d_4\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"189.001989\" xlink:href=\"#m1913da21f1\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_4\">\n      <!-- 5 -->\n      <g transform=\"translate(185.820739 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_5\">\n     <g id=\"line2d_5\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"233.388352\" xlink:href=\"#m1913da21f1\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_5\">\n      <!-- 10 -->\n      <g transform=\"translate(227.025852 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_6\">\n     <!-- x -->\n     <defs>\n      <path d=\"M 54.890625 54.6875 \nL 35.109375 28.078125 \nL 55.90625 0 \nL 45.3125 0 \nL 29.390625 21.484375 \nL 13.484375 0 \nL 2.875 0 \nL 24.125 28.609375 \nL 4.6875 54.6875 \nL 15.28125 54.6875 \nL 29.78125 35.203125 \nL 44.28125 54.6875 \nz\n\" id=\"DejaVuSans-120\"/>\n     </defs>\n     <g transform=\"translate(141.65625 171.376563)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-120\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"matplotlib.axis_2\">\n    <g id=\"ytick_1\">\n     <g id=\"line2d_6\">\n      <defs>\n       <path d=\"M 0 0 \nL -3.5 0 \n\" id=\"m8e519f74ae\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"46.965625\" xlink:href=\"#m8e519f74ae\" y=\"136.922727\"/>\n      </g>\n     </g>\n     <g id=\"text_7\">\n      <!-- 0 -->\n      <g transform=\"translate(33.603125 140.721946)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_2\">\n     <g id=\"line2d_7\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"46.965625\" xlink:href=\"#m8e519f74ae\" y=\"112.213636\"/>\n      </g>\n     </g>\n     <g id=\"text_8\">\n      <!-- 20 -->\n      <defs>\n       <path d=\"M 19.1875 8.296875 \nL 53.609375 8.296875 \nL 53.609375 0 \nL 7.328125 0 \nL 7.328125 8.296875 \nQ 12.9375 14.109375 22.625 23.890625 \nQ 32.328125 33.6875 34.8125 36.53125 \nQ 39.546875 41.84375 41.421875 45.53125 \nQ 43.3125 49.21875 43.3125 52.78125 \nQ 43.3125 58.59375 39.234375 62.25 \nQ 35.15625 65.921875 28.609375 65.921875 \nQ 23.96875 65.921875 18.8125 64.3125 \nQ 13.671875 62.703125 7.8125 59.421875 \nL 7.8125 69.390625 \nQ 13.765625 71.78125 18.9375 73 \nQ 24.125 74.21875 28.421875 74.21875 \nQ 39.75 74.21875 46.484375 68.546875 \nQ 53.21875 62.890625 53.21875 53.421875 \nQ 53.21875 48.921875 51.53125 44.890625 \nQ 49.859375 40.875 45.40625 35.40625 \nQ 44.1875 33.984375 37.640625 27.21875 \nQ 31.109375 20.453125 19.1875 8.296875 \nz\n\" id=\"DejaVuSans-50\"/>\n      </defs>\n      <g transform=\"translate(27.240625 116.012855)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_3\">\n     <g id=\"line2d_8\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"46.965625\" xlink:href=\"#m8e519f74ae\" y=\"87.504545\"/>\n      </g>\n     </g>\n     <g id=\"text_9\">\n      <!-- 40 -->\n      <defs>\n       <path d=\"M 37.796875 64.3125 \nL 12.890625 25.390625 \nL 37.796875 25.390625 \nz\nM 35.203125 72.90625 \nL 47.609375 72.90625 \nL 47.609375 25.390625 \nL 58.015625 25.390625 \nL 58.015625 17.1875 \nL 47.609375 17.1875 \nL 47.609375 0 \nL 37.796875 0 \nL 37.796875 17.1875 \nL 4.890625 17.1875 \nL 4.890625 26.703125 \nz\n\" id=\"DejaVuSans-52\"/>\n      </defs>\n      <g transform=\"translate(27.240625 91.303764)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_4\">\n     <g id=\"line2d_9\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"46.965625\" xlink:href=\"#m8e519f74ae\" y=\"62.795455\"/>\n      </g>\n     </g>\n     <g id=\"text_10\">\n      <!-- 60 -->\n      <defs>\n       <path d=\"M 33.015625 40.375 \nQ 26.375 40.375 22.484375 35.828125 \nQ 18.609375 31.296875 18.609375 23.390625 \nQ 18.609375 15.53125 22.484375 10.953125 \nQ 26.375 6.390625 33.015625 6.390625 \nQ 39.65625 6.390625 43.53125 10.953125 \nQ 47.40625 15.53125 47.40625 23.390625 \nQ 47.40625 31.296875 43.53125 35.828125 \nQ 39.65625 40.375 33.015625 40.375 \nz\nM 52.59375 71.296875 \nL 52.59375 62.3125 \nQ 48.875 64.0625 45.09375 64.984375 \nQ 41.3125 65.921875 37.59375 65.921875 \nQ 27.828125 65.921875 22.671875 59.328125 \nQ 17.53125 52.734375 16.796875 39.40625 \nQ 19.671875 43.65625 24.015625 45.921875 \nQ 28.375 48.1875 33.59375 48.1875 \nQ 44.578125 48.1875 50.953125 41.515625 \nQ 57.328125 34.859375 57.328125 23.390625 \nQ 57.328125 12.15625 50.6875 5.359375 \nQ 44.046875 -1.421875 33.015625 -1.421875 \nQ 20.359375 -1.421875 13.671875 8.265625 \nQ 6.984375 17.96875 6.984375 36.375 \nQ 6.984375 53.65625 15.1875 63.9375 \nQ 23.390625 74.21875 37.203125 74.21875 \nQ 40.921875 74.21875 44.703125 73.484375 \nQ 48.484375 72.75 52.59375 71.296875 \nz\n\" id=\"DejaVuSans-54\"/>\n      </defs>\n      <g transform=\"translate(27.240625 66.594673)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-54\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_5\">\n     <g id=\"line2d_10\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"46.965625\" xlink:href=\"#m8e519f74ae\" y=\"38.086364\"/>\n      </g>\n     </g>\n     <g id=\"text_11\">\n      <!-- 80 -->\n      <defs>\n       <path d=\"M 31.78125 34.625 \nQ 24.75 34.625 20.71875 30.859375 \nQ 16.703125 27.09375 16.703125 20.515625 \nQ 16.703125 13.921875 20.71875 10.15625 \nQ 24.75 6.390625 31.78125 6.390625 \nQ 38.8125 6.390625 42.859375 10.171875 \nQ 46.921875 13.96875 46.921875 20.515625 \nQ 46.921875 27.09375 42.890625 30.859375 \nQ 38.875 34.625 31.78125 34.625 \nz\nM 21.921875 38.8125 \nQ 15.578125 40.375 12.03125 44.71875 \nQ 8.5 49.078125 8.5 55.328125 \nQ 8.5 64.0625 14.71875 69.140625 \nQ 20.953125 74.21875 31.78125 74.21875 \nQ 42.671875 74.21875 48.875 69.140625 \nQ 55.078125 64.0625 55.078125 55.328125 \nQ 55.078125 49.078125 51.53125 44.71875 \nQ 48 40.375 41.703125 38.8125 \nQ 48.828125 37.15625 52.796875 32.3125 \nQ 56.78125 27.484375 56.78125 20.515625 \nQ 56.78125 9.90625 50.3125 4.234375 \nQ 43.84375 -1.421875 31.78125 -1.421875 \nQ 19.734375 -1.421875 13.25 4.234375 \nQ 6.78125 9.90625 6.78125 20.515625 \nQ 6.78125 27.484375 10.78125 32.3125 \nQ 14.796875 37.15625 21.921875 38.8125 \nz\nM 18.3125 54.390625 \nQ 18.3125 48.734375 21.84375 45.5625 \nQ 25.390625 42.390625 31.78125 42.390625 \nQ 38.140625 42.390625 41.71875 45.5625 \nQ 45.3125 48.734375 45.3125 54.390625 \nQ 45.3125 60.0625 41.71875 63.234375 \nQ 38.140625 66.40625 31.78125 66.40625 \nQ 25.390625 66.40625 21.84375 63.234375 \nQ 18.3125 60.0625 18.3125 54.390625 \nz\n\" id=\"DejaVuSans-56\"/>\n      </defs>\n      <g transform=\"translate(27.240625 41.885582)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-56\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_6\">\n     <g id=\"line2d_11\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"46.965625\" xlink:href=\"#m8e519f74ae\" y=\"13.377273\"/>\n      </g>\n     </g>\n     <g id=\"text_12\">\n      <!-- 100 -->\n      <g transform=\"translate(20.878125 17.176491)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"127.246094\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_13\">\n     <!-- f(x) -->\n     <defs>\n      <path d=\"M 37.109375 75.984375 \nL 37.109375 68.5 \nL 28.515625 68.5 \nQ 23.6875 68.5 21.796875 66.546875 \nQ 19.921875 64.59375 19.921875 59.515625 \nL 19.921875 54.6875 \nL 34.71875 54.6875 \nL 34.71875 47.703125 \nL 19.921875 47.703125 \nL 19.921875 0 \nL 10.890625 0 \nL 10.890625 47.703125 \nL 2.296875 47.703125 \nL 2.296875 54.6875 \nL 10.890625 54.6875 \nL 10.890625 58.5 \nQ 10.890625 67.625 15.140625 71.796875 \nQ 19.390625 75.984375 28.609375 75.984375 \nz\n\" id=\"DejaVuSans-102\"/>\n      <path d=\"M 31 75.875 \nQ 24.46875 64.65625 21.28125 53.65625 \nQ 18.109375 42.671875 18.109375 31.390625 \nQ 18.109375 20.125 21.3125 9.0625 \nQ 24.515625 -2 31 -13.1875 \nL 23.1875 -13.1875 \nQ 15.875 -1.703125 12.234375 9.375 \nQ 8.59375 20.453125 8.59375 31.390625 \nQ 8.59375 42.28125 12.203125 53.3125 \nQ 15.828125 64.359375 23.1875 75.875 \nz\n\" id=\"DejaVuSans-40\"/>\n      <path d=\"M 8.015625 75.875 \nL 15.828125 75.875 \nQ 23.140625 64.359375 26.78125 53.3125 \nQ 30.421875 42.28125 30.421875 31.390625 \nQ 30.421875 20.453125 26.78125 9.375 \nQ 23.140625 -1.703125 15.828125 -13.1875 \nL 8.015625 -13.1875 \nQ 14.5 -2 17.703125 9.0625 \nQ 20.90625 20.125 20.90625 31.390625 \nQ 20.90625 42.671875 17.703125 53.65625 \nQ 14.5 64.65625 8.015625 75.875 \nz\n\" id=\"DejaVuSans-41\"/>\n     </defs>\n     <g transform=\"translate(14.798438 83.771094)rotate(-90)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-102\"/>\n      <use x=\"35.205078\" xlink:href=\"#DejaVuSans-40\"/>\n      <use x=\"74.21875\" xlink:href=\"#DejaVuSans-120\"/>\n      <use x=\"133.398438\" xlink:href=\"#DejaVuSans-41\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"line2d_12\">\n    <path clip-path=\"url(#p588f9a7f50)\" d=\"M 55.842898 13.377273 \nL 60.281534 25.422955 \nL 64.72017 36.850909 \nL 69.158807 47.661136 \nL 73.597443 57.853636 \nL 78.03608 67.428409 \nL 82.474716 76.385455 \nL 86.025625 83.106327 \nL 89.576534 89.431855 \nL 93.127443 95.362036 \nL 96.678352 100.896873 \nL 100.229261 106.036364 \nL 103.78017 110.780509 \nL 107.33108 115.129309 \nL 110.881989 119.082764 \nL 114.432898 122.640873 \nL 117.983807 125.803636 \nL 120.646989 127.916264 \nL 123.31017 129.806509 \nL 125.973352 131.474373 \nL 128.636534 132.919855 \nL 131.299716 134.142955 \nL 133.962898 135.143673 \nL 136.62608 135.922009 \nL 139.289261 136.477964 \nL 141.952443 136.811536 \nL 144.615625 136.922727 \nL 147.278807 136.811536 \nL 149.941989 136.477964 \nL 152.60517 135.922009 \nL 155.268352 135.143673 \nL 157.931534 134.142955 \nL 160.594716 132.919855 \nL 163.257898 131.474373 \nL 165.92108 129.806509 \nL 168.584261 127.916264 \nL 171.247443 125.803636 \nL 173.910625 123.468627 \nL 177.461534 120.009355 \nL 181.012443 116.154736 \nL 184.563352 111.904773 \nL 188.114261 107.259464 \nL 191.66517 102.218809 \nL 195.21608 96.782809 \nL 198.766989 90.951464 \nL 202.317898 84.724773 \nL 205.868807 78.102736 \nL 209.419716 71.085355 \nL 213.858352 61.757673 \nL 218.296989 51.812264 \nL 222.735625 41.249127 \nL 227.174261 30.068264 \nL 231.612898 18.269673 \nL 232.500625 15.835827 \nL 232.500625 15.835827 \n\" style=\"fill:none;stroke:#1f77b4;stroke-linecap:square;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"line2d_13\">\n    <path clip-path=\"url(#p588f9a7f50)\" d=\"M 233.388352 13.377273 \nL 224.51108 36.850909 \nL 216.521534 55.864555 \nL 209.330943 71.265607 \nL 202.859411 83.74046 \nL 197.035033 93.845091 \nL 191.793092 102.029842 \nL 187.075345 108.65949 \nL 182.829373 114.029505 \nL 179.007998 118.379217 \nL 175.568761 121.902484 \n\" style=\"fill:none;stroke:#ff7f0e;stroke-linecap:square;stroke-width:1.5;\"/>\n    <defs>\n     <path d=\"M 0 3 \nC 0.795609 3 1.55874 2.683901 2.12132 2.12132 \nC 2.683901 1.55874 3 0.795609 3 0 \nC 3 -0.795609 2.683901 -1.55874 2.12132 -2.12132 \nC 1.55874 -2.683901 0.795609 -3 0 -3 \nC -0.795609 -3 -1.55874 -2.683901 -2.12132 -2.12132 \nC -2.683901 -1.55874 -3 -0.795609 -3 0 \nC -3 0.795609 -2.683901 1.55874 -2.12132 2.12132 \nC -1.55874 2.683901 -0.795609 3 0 3 \nz\n\" id=\"m1df70c521b\" style=\"stroke:#ff7f0e;\"/>\n    </defs>\n    <g clip-path=\"url(#p588f9a7f50)\">\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"233.388352\" xlink:href=\"#m1df70c521b\" y=\"13.377273\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"224.51108\" xlink:href=\"#m1df70c521b\" y=\"36.850909\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"216.521534\" xlink:href=\"#m1df70c521b\" y=\"55.864555\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"209.330943\" xlink:href=\"#m1df70c521b\" y=\"71.265607\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"202.859411\" xlink:href=\"#m1df70c521b\" y=\"83.74046\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"197.035033\" xlink:href=\"#m1df70c521b\" y=\"93.845091\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"191.793092\" xlink:href=\"#m1df70c521b\" y=\"102.029842\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"187.075345\" xlink:href=\"#m1df70c521b\" y=\"108.65949\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"182.829373\" xlink:href=\"#m1df70c521b\" y=\"114.029505\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"179.007998\" xlink:href=\"#m1df70c521b\" y=\"118.379217\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"175.568761\" xlink:href=\"#m1df70c521b\" y=\"121.902484\"/>\n    </g>\n   </g>\n   <g id=\"patch_3\">\n    <path d=\"M 46.965625 143.1 \nL 46.965625 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_4\">\n    <path d=\"M 242.265625 143.1 \nL 242.265625 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_5\">\n    <path d=\"M 46.965625 143.1 \nL 242.265625 143.1 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_6\">\n    <path d=\"M 46.965625 7.2 \nL 242.265625 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"p588f9a7f50\">\n   <rect height=\"135.9\" width=\"195.3\" x=\"46.965625\" y=\"7.2\"/>\n  </clipPath>\n </defs>\n</svg>\n"
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "ApUoTRvOrWCe",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 282
        },
        "outputId": "165694d8-aa04-4b02-a40c-242661b3136f"
      },
      "source": [
        "show_trace(gd(1.1))"
      ],
      "execution_count": 6,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "epoch 10, x: 61.917364224000096\n"
          ],
          "name": "stdout"
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 252x180 with 1 Axes>"
            ],
            "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (https://matplotlib.org/) -->\n<svg height=\"183.635391pt\" version=\"1.1\" viewBox=\"0 0 255.828125 183.635391\" width=\"255.828125pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n  <style type=\"text/css\">\n*{stroke-linecap:butt;stroke-linejoin:round;}\n  </style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M 0 183.635391 \nL 255.828125 183.635391 \nL 255.828125 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"patch_2\">\n    <path d=\"M 53.328125 146.079141 \nL 248.628125 146.079141 \nL 248.628125 10.179141 \nL 53.328125 10.179141 \nz\n\" style=\"fill:#ffffff;\"/>\n   </g>\n   <g id=\"matplotlib.axis_1\">\n    <g id=\"xtick_1\">\n     <g id=\"line2d_1\">\n      <defs>\n       <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"m3c6b14c892\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"79.29167\" xlink:href=\"#m3c6b14c892\" y=\"146.079141\"/>\n      </g>\n     </g>\n     <g id=\"text_1\">\n      <!-- −50 -->\n      <defs>\n       <path d=\"M 10.59375 35.5 \nL 73.1875 35.5 \nL 73.1875 27.203125 \nL 10.59375 27.203125 \nz\n\" id=\"DejaVuSans-8722\"/>\n       <path d=\"M 10.796875 72.90625 \nL 49.515625 72.90625 \nL 49.515625 64.59375 \nL 19.828125 64.59375 \nL 19.828125 46.734375 \nQ 21.96875 47.46875 24.109375 47.828125 \nQ 26.265625 48.1875 28.421875 48.1875 \nQ 40.625 48.1875 47.75 41.5 \nQ 54.890625 34.8125 54.890625 23.390625 \nQ 54.890625 11.625 47.5625 5.09375 \nQ 40.234375 -1.421875 26.90625 -1.421875 \nQ 22.3125 -1.421875 17.546875 -0.640625 \nQ 12.796875 0.140625 7.71875 1.703125 \nL 7.71875 11.625 \nQ 12.109375 9.234375 16.796875 8.0625 \nQ 21.484375 6.890625 26.703125 6.890625 \nQ 35.15625 6.890625 40.078125 11.328125 \nQ 45.015625 15.765625 45.015625 23.390625 \nQ 45.015625 31 40.078125 35.4375 \nQ 35.15625 39.890625 26.703125 39.890625 \nQ 22.75 39.890625 18.8125 39.015625 \nQ 14.890625 38.140625 10.796875 36.28125 \nz\n\" id=\"DejaVuSans-53\"/>\n       <path d=\"M 31.78125 66.40625 \nQ 24.171875 66.40625 20.328125 58.90625 \nQ 16.5 51.421875 16.5 36.375 \nQ 16.5 21.390625 20.328125 13.890625 \nQ 24.171875 6.390625 31.78125 6.390625 \nQ 39.453125 6.390625 43.28125 13.890625 \nQ 47.125 21.390625 47.125 36.375 \nQ 47.125 51.421875 43.28125 58.90625 \nQ 39.453125 66.40625 31.78125 66.40625 \nz\nM 31.78125 74.21875 \nQ 44.046875 74.21875 50.515625 64.515625 \nQ 56.984375 54.828125 56.984375 36.375 \nQ 56.984375 17.96875 50.515625 8.265625 \nQ 44.046875 -1.421875 31.78125 -1.421875 \nQ 19.53125 -1.421875 13.0625 8.265625 \nQ 6.59375 17.96875 6.59375 36.375 \nQ 6.59375 54.828125 13.0625 64.515625 \nQ 19.53125 74.21875 31.78125 74.21875 \nz\n\" id=\"DejaVuSans-48\"/>\n      </defs>\n      <g transform=\"translate(68.739326 160.677578)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-53\"/>\n       <use x=\"147.412109\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_2\">\n     <g id=\"line2d_2\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"115.134897\" xlink:href=\"#m3c6b14c892\" y=\"146.079141\"/>\n      </g>\n     </g>\n     <g id=\"text_2\">\n      <!-- −25 -->\n      <defs>\n       <path d=\"M 19.1875 8.296875 \nL 53.609375 8.296875 \nL 53.609375 0 \nL 7.328125 0 \nL 7.328125 8.296875 \nQ 12.9375 14.109375 22.625 23.890625 \nQ 32.328125 33.6875 34.8125 36.53125 \nQ 39.546875 41.84375 41.421875 45.53125 \nQ 43.3125 49.21875 43.3125 52.78125 \nQ 43.3125 58.59375 39.234375 62.25 \nQ 35.15625 65.921875 28.609375 65.921875 \nQ 23.96875 65.921875 18.8125 64.3125 \nQ 13.671875 62.703125 7.8125 59.421875 \nL 7.8125 69.390625 \nQ 13.765625 71.78125 18.9375 73 \nQ 24.125 74.21875 28.421875 74.21875 \nQ 39.75 74.21875 46.484375 68.546875 \nQ 53.21875 62.890625 53.21875 53.421875 \nQ 53.21875 48.921875 51.53125 44.890625 \nQ 49.859375 40.875 45.40625 35.40625 \nQ 44.1875 33.984375 37.640625 27.21875 \nQ 31.109375 20.453125 19.1875 8.296875 \nz\n\" id=\"DejaVuSans-50\"/>\n      </defs>\n      <g transform=\"translate(104.582554 160.677578)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"147.412109\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_3\">\n     <g id=\"line2d_3\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"150.978125\" xlink:href=\"#m3c6b14c892\" y=\"146.079141\"/>\n      </g>\n     </g>\n     <g id=\"text_3\">\n      <!-- 0 -->\n      <g transform=\"translate(147.796875 160.677578)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_4\">\n     <g id=\"line2d_4\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"186.821353\" xlink:href=\"#m3c6b14c892\" y=\"146.079141\"/>\n      </g>\n     </g>\n     <g id=\"text_4\">\n      <!-- 25 -->\n      <g transform=\"translate(180.458853 160.677578)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-53\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_5\">\n     <g id=\"line2d_5\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"222.66458\" xlink:href=\"#m3c6b14c892\" y=\"146.079141\"/>\n      </g>\n     </g>\n     <g id=\"text_5\">\n      <!-- 50 -->\n      <g transform=\"translate(216.30208 160.677578)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-53\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_6\">\n     <!-- x -->\n     <defs>\n      <path d=\"M 54.890625 54.6875 \nL 35.109375 28.078125 \nL 55.90625 0 \nL 45.3125 0 \nL 29.390625 21.484375 \nL 13.484375 0 \nL 2.875 0 \nL 24.125 28.609375 \nL 4.6875 54.6875 \nL 15.28125 54.6875 \nL 29.78125 35.203125 \nL 44.28125 54.6875 \nz\n\" id=\"DejaVuSans-120\"/>\n     </defs>\n     <g transform=\"translate(148.01875 174.355703)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-120\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"matplotlib.axis_2\">\n    <g id=\"ytick_1\">\n     <g id=\"line2d_6\">\n      <defs>\n       <path d=\"M 0 0 \nL -3.5 0 \n\" id=\"m1f14fcb215\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"53.328125\" xlink:href=\"#m1f14fcb215\" y=\"139.901878\"/>\n      </g>\n     </g>\n     <g id=\"text_7\">\n      <!-- 0 -->\n      <g transform=\"translate(39.965625 143.701097)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_2\">\n     <g id=\"line2d_7\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"53.328125\" xlink:href=\"#m1f14fcb215\" y=\"107.676213\"/>\n      </g>\n     </g>\n     <g id=\"text_8\">\n      <!-- 1000 -->\n      <defs>\n       <path d=\"M 12.40625 8.296875 \nL 28.515625 8.296875 \nL 28.515625 63.921875 \nL 10.984375 60.40625 \nL 10.984375 69.390625 \nL 28.421875 72.90625 \nL 38.28125 72.90625 \nL 38.28125 8.296875 \nL 54.390625 8.296875 \nL 54.390625 0 \nL 12.40625 0 \nz\n\" id=\"DejaVuSans-49\"/>\n      </defs>\n      <g transform=\"translate(20.878125 111.475432)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-49\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"127.246094\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"190.869141\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_3\">\n     <g id=\"line2d_8\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"53.328125\" xlink:href=\"#m1f14fcb215\" y=\"75.450548\"/>\n      </g>\n     </g>\n     <g id=\"text_9\">\n      <!-- 2000 -->\n      <g transform=\"translate(20.878125 79.249767)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-50\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"127.246094\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"190.869141\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_4\">\n     <g id=\"line2d_9\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"53.328125\" xlink:href=\"#m1f14fcb215\" y=\"43.224884\"/>\n      </g>\n     </g>\n     <g id=\"text_10\">\n      <!-- 3000 -->\n      <defs>\n       <path d=\"M 40.578125 39.3125 \nQ 47.65625 37.796875 51.625 33 \nQ 55.609375 28.21875 55.609375 21.1875 \nQ 55.609375 10.40625 48.1875 4.484375 \nQ 40.765625 -1.421875 27.09375 -1.421875 \nQ 22.515625 -1.421875 17.65625 -0.515625 \nQ 12.796875 0.390625 7.625 2.203125 \nL 7.625 11.71875 \nQ 11.71875 9.328125 16.59375 8.109375 \nQ 21.484375 6.890625 26.8125 6.890625 \nQ 36.078125 6.890625 40.9375 10.546875 \nQ 45.796875 14.203125 45.796875 21.1875 \nQ 45.796875 27.640625 41.28125 31.265625 \nQ 36.765625 34.90625 28.71875 34.90625 \nL 20.21875 34.90625 \nL 20.21875 43.015625 \nL 29.109375 43.015625 \nQ 36.375 43.015625 40.234375 45.921875 \nQ 44.09375 48.828125 44.09375 54.296875 \nQ 44.09375 59.90625 40.109375 62.90625 \nQ 36.140625 65.921875 28.71875 65.921875 \nQ 24.65625 65.921875 20.015625 65.03125 \nQ 15.375 64.15625 9.8125 62.3125 \nL 9.8125 71.09375 \nQ 15.4375 72.65625 20.34375 73.4375 \nQ 25.25 74.21875 29.59375 74.21875 \nQ 40.828125 74.21875 47.359375 69.109375 \nQ 53.90625 64.015625 53.90625 55.328125 \nQ 53.90625 49.265625 50.4375 45.09375 \nQ 46.96875 40.921875 40.578125 39.3125 \nz\n\" id=\"DejaVuSans-51\"/>\n      </defs>\n      <g transform=\"translate(20.878125 47.024102)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-51\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"127.246094\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"190.869141\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_5\">\n     <g id=\"line2d_10\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"53.328125\" xlink:href=\"#m1f14fcb215\" y=\"10.999219\"/>\n      </g>\n     </g>\n     <g id=\"text_11\">\n      <!-- 4000 -->\n      <defs>\n       <path d=\"M 37.796875 64.3125 \nL 12.890625 25.390625 \nL 37.796875 25.390625 \nz\nM 35.203125 72.90625 \nL 47.609375 72.90625 \nL 47.609375 25.390625 \nL 58.015625 25.390625 \nL 58.015625 17.1875 \nL 47.609375 17.1875 \nL 47.609375 0 \nL 37.796875 0 \nL 37.796875 17.1875 \nL 4.890625 17.1875 \nL 4.890625 26.703125 \nz\n\" id=\"DejaVuSans-52\"/>\n      </defs>\n      <g transform=\"translate(20.878125 14.798437)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-52\"/>\n       <use x=\"63.623047\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"127.246094\" xlink:href=\"#DejaVuSans-48\"/>\n       <use x=\"190.869141\" xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_12\">\n     <!-- f(x) -->\n     <defs>\n      <path d=\"M 37.109375 75.984375 \nL 37.109375 68.5 \nL 28.515625 68.5 \nQ 23.6875 68.5 21.796875 66.546875 \nQ 19.921875 64.59375 19.921875 59.515625 \nL 19.921875 54.6875 \nL 34.71875 54.6875 \nL 34.71875 47.703125 \nL 19.921875 47.703125 \nL 19.921875 0 \nL 10.890625 0 \nL 10.890625 47.703125 \nL 2.296875 47.703125 \nL 2.296875 54.6875 \nL 10.890625 54.6875 \nL 10.890625 58.5 \nQ 10.890625 67.625 15.140625 71.796875 \nQ 19.390625 75.984375 28.609375 75.984375 \nz\n\" id=\"DejaVuSans-102\"/>\n      <path d=\"M 31 75.875 \nQ 24.46875 64.65625 21.28125 53.65625 \nQ 18.109375 42.671875 18.109375 31.390625 \nQ 18.109375 20.125 21.3125 9.0625 \nQ 24.515625 -2 31 -13.1875 \nL 23.1875 -13.1875 \nQ 15.875 -1.703125 12.234375 9.375 \nQ 8.59375 20.453125 8.59375 31.390625 \nQ 8.59375 42.28125 12.203125 53.3125 \nQ 15.828125 64.359375 23.1875 75.875 \nz\n\" id=\"DejaVuSans-40\"/>\n      <path d=\"M 8.015625 75.875 \nL 15.828125 75.875 \nQ 23.140625 64.359375 26.78125 53.3125 \nQ 30.421875 42.28125 30.421875 31.390625 \nQ 30.421875 20.453125 26.78125 9.375 \nQ 23.140625 -1.703125 15.828125 -13.1875 \nL 8.015625 -13.1875 \nQ 14.5 -2 17.703125 9.0625 \nQ 20.90625 20.125 20.90625 31.390625 \nQ 20.90625 42.671875 17.703125 53.65625 \nQ 14.5 64.65625 8.015625 75.875 \nz\n\" id=\"DejaVuSans-41\"/>\n     </defs>\n     <g transform=\"translate(14.798437 86.750235)rotate(-90)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-102\"/>\n      <use x=\"35.205078\" xlink:href=\"#DejaVuSans-40\"/>\n      <use x=\"74.21875\" xlink:href=\"#DejaVuSans-120\"/>\n      <use x=\"133.398438\" xlink:href=\"#DejaVuSans-41\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"line2d_11\">\n    <path clip-path=\"url(#pebdc6918e2)\" d=\"M 62.205398 16.356414 \nL 66.793331 28.796523 \nL 71.237891 40.218512 \nL 75.539078 50.682321 \nL 79.840266 60.566067 \nL 83.99808 69.568974 \nL 88.012522 77.747114 \nL 92.026963 85.419956 \nL 95.898032 92.340217 \nL 99.625727 98.560102 \nL 103.353423 104.344296 \nL 106.937746 109.495143 \nL 110.378696 114.060984 \nL 113.819646 118.255584 \nL 117.117222 121.92705 \nL 120.271427 125.119853 \nL 123.425631 128.000711 \nL 126.436462 130.459624 \nL 129.447293 132.634306 \nL 132.314751 134.441182 \nL 135.182209 135.990252 \nL 138.049667 137.281517 \nL 140.773753 138.269426 \nL 143.497838 139.024667 \nL 146.221923 139.547237 \nL 148.946009 139.837139 \nL 151.670094 139.894371 \nL 154.394179 139.718934 \nL 157.118265 139.310828 \nL 159.84235 138.670052 \nL 162.566435 137.796607 \nL 165.29052 136.690493 \nL 168.014606 135.35171 \nL 170.882064 133.691104 \nL 173.749522 131.772692 \nL 176.760353 129.480897 \nL 179.771184 126.904872 \nL 182.925388 123.901324 \nL 186.079593 120.585832 \nL 189.377169 116.7861 \nL 192.674746 112.64542 \nL 196.115696 107.961205 \nL 199.556646 102.905751 \nL 203.140969 97.244888 \nL 206.868665 90.930279 \nL 210.59636 84.179978 \nL 214.467429 76.708901 \nL 218.48187 68.464843 \nL 222.496312 59.715486 \nL 226.654126 50.120962 \nL 230.955314 39.625198 \nL 235.399874 28.170187 \nL 239.701061 16.494964 \nL 239.701061 16.494964 \n\" style=\"fill:none;stroke:#1f77b4;stroke-linecap:square;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"line2d_12\">\n    <path clip-path=\"url(#pebdc6918e2)\" d=\"M 165.315416 136.679311 \nL 133.773376 135.261382 \nL 171.623824 133.219564 \nL 126.203286 130.279346 \nL 180.707932 126.045432 \nL 115.302357 119.948596 \nL 193.789047 111.169151 \nL 99.605019 98.526752 \nL 212.625852 80.321696 \nL 77.000852 54.106416 \nL 239.750852 16.356414 \n\" style=\"fill:none;stroke:#ff7f0e;stroke-linecap:square;stroke-width:1.5;\"/>\n    <defs>\n     <path d=\"M 0 3 \nC 0.795609 3 1.55874 2.683901 2.12132 2.12132 \nC 2.683901 1.55874 3 0.795609 3 0 \nC 3 -0.795609 2.683901 -1.55874 2.12132 -2.12132 \nC 1.55874 -2.683901 0.795609 -3 0 -3 \nC -0.795609 -3 -1.55874 -2.683901 -2.12132 -2.12132 \nC -2.683901 -1.55874 -3 -0.795609 -3 0 \nC -3 0.795609 -2.683901 1.55874 -2.12132 2.12132 \nC -1.55874 2.683901 -0.795609 3 0 3 \nz\n\" id=\"me3c1a475f2\" style=\"stroke:#ff7f0e;\"/>\n    </defs>\n    <g clip-path=\"url(#pebdc6918e2)\">\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"165.315416\" xlink:href=\"#me3c1a475f2\" y=\"136.679311\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"133.773376\" xlink:href=\"#me3c1a475f2\" y=\"135.261382\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"171.623824\" xlink:href=\"#me3c1a475f2\" y=\"133.219564\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"126.203286\" xlink:href=\"#me3c1a475f2\" y=\"130.279346\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"180.707932\" xlink:href=\"#me3c1a475f2\" y=\"126.045432\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"115.302357\" xlink:href=\"#me3c1a475f2\" y=\"119.948596\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"193.789047\" xlink:href=\"#me3c1a475f2\" y=\"111.169151\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"99.605019\" xlink:href=\"#me3c1a475f2\" y=\"98.526752\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"212.625852\" xlink:href=\"#me3c1a475f2\" y=\"80.321696\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"77.000852\" xlink:href=\"#me3c1a475f2\" y=\"54.106416\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"239.750852\" xlink:href=\"#me3c1a475f2\" y=\"16.356414\"/>\n    </g>\n   </g>\n   <g id=\"patch_3\">\n    <path d=\"M 53.328125 146.079141 \nL 53.328125 10.179141 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_4\">\n    <path d=\"M 248.628125 146.079141 \nL 248.628125 10.179141 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_5\">\n    <path d=\"M 53.328125 146.079141 \nL 248.628125 146.079141 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_6\">\n    <path d=\"M 53.328125 10.179141 \nL 248.628125 10.179141 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"pebdc6918e2\">\n   <rect height=\"135.9\" width=\"195.3\" x=\"53.328125\" y=\"10.179141\"/>\n  </clipPath>\n </defs>\n</svg>\n"
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "oSDp_2K-rb-x",
        "colab_type": "text"
      },
      "source": [
        "### 7.2.3 多维梯度下降"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "D6k4XLNbrj2K",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "def train_2d(trainer):\n",
        "    x1, x2, s1, s2 = -5, -2, 0, 0 \n",
        "    results = [(x1, x2)]\n",
        "    for i in range(20):\n",
        "        x1, x2, s1, s2 = trainer(x1, x2, s1, s2)\n",
        "        results.append((x1, x2))\n",
        "    print('epoch %d, x1 %f, x2 %f' % (i + 1, x1, x2))\n",
        "    return results \n",
        "\n",
        "def show_trace_2d(f, results):\n",
        "    d2l.plt.plot(*zip(*results), '-o', color='#ff7f0e')\n",
        "    x1, x2 = np.meshgrid(np.arange(-5.5, 1.0, 0.1), np.arange(-3.0, 1.0, 0.1))\n",
        "    d2l.plt.contour(x1, x2, f(x1, x2), colors='#1f77b4')\n",
        "    d2l.plt.xlabel('x1')\n",
        "    d2l.plt.ylabel('x2')"
      ],
      "execution_count": 0,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "TpECHjwSs4gn",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 278
        },
        "outputId": "72ada3a2-c360-4de4-ec77-aadc4fecb8f7"
      },
      "source": [
        "eta = 0.1 \n",
        "\n",
        "def f_2d(x1, x2):\n",
        "    return x1 ** 2 + 2 * x2 ** 2 \n",
        "\n",
        "def gd_2d(x1, x2, s1, s2):\n",
        "    return (x1 - eta * 2 * x1, x2 - eta * 4 * x2, 0, 0)\n",
        "\n",
        "show_trace_2d(f_2d, train_2d(gd_2d))"
      ],
      "execution_count": 10,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "epoch 20, x1 -0.057646, x2 -0.000073\n"
          ],
          "name": "stdout"
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 252x180 with 1 Axes>"
            ],
            "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (https://matplotlib.org/) -->\n<svg height=\"180.65625pt\" version=\"1.1\" viewBox=\"0 0 245.120313 180.65625\" width=\"245.120313pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n  <style type=\"text/css\">\n*{stroke-linecap:butt;stroke-linejoin:round;}\n  </style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M 0 180.65625 \nL 245.120313 180.65625 \nL 245.120313 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"patch_2\">\n    <path d=\"M 42.620312 143.1 \nL 237.920313 143.1 \nL 237.920313 7.2 \nL 42.620312 7.2 \nz\n\" style=\"fill:#ffffff;\"/>\n   </g>\n   <g id=\"matplotlib.axis_1\">\n    <g id=\"xtick_1\">\n     <g id=\"line2d_1\">\n      <defs>\n       <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"mdd5d2cef19\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"88.39375\" xlink:href=\"#mdd5d2cef19\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_1\">\n      <!-- −4 -->\n      <defs>\n       <path d=\"M 10.59375 35.5 \nL 73.1875 35.5 \nL 73.1875 27.203125 \nL 10.59375 27.203125 \nz\n\" id=\"DejaVuSans-8722\"/>\n       <path d=\"M 37.796875 64.3125 \nL 12.890625 25.390625 \nL 37.796875 25.390625 \nz\nM 35.203125 72.90625 \nL 47.609375 72.90625 \nL 47.609375 25.390625 \nL 58.015625 25.390625 \nL 58.015625 17.1875 \nL 47.609375 17.1875 \nL 47.609375 0 \nL 37.796875 0 \nL 37.796875 17.1875 \nL 4.890625 17.1875 \nL 4.890625 26.703125 \nz\n\" id=\"DejaVuSans-52\"/>\n      </defs>\n      <g transform=\"translate(81.022656 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-52\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_2\">\n     <g id=\"line2d_2\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"149.425\" xlink:href=\"#mdd5d2cef19\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_2\">\n      <!-- −2 -->\n      <defs>\n       <path d=\"M 19.1875 8.296875 \nL 53.609375 8.296875 \nL 53.609375 0 \nL 7.328125 0 \nL 7.328125 8.296875 \nQ 12.9375 14.109375 22.625 23.890625 \nQ 32.328125 33.6875 34.8125 36.53125 \nQ 39.546875 41.84375 41.421875 45.53125 \nQ 43.3125 49.21875 43.3125 52.78125 \nQ 43.3125 58.59375 39.234375 62.25 \nQ 35.15625 65.921875 28.609375 65.921875 \nQ 23.96875 65.921875 18.8125 64.3125 \nQ 13.671875 62.703125 7.8125 59.421875 \nL 7.8125 69.390625 \nQ 13.765625 71.78125 18.9375 73 \nQ 24.125 74.21875 28.421875 74.21875 \nQ 39.75 74.21875 46.484375 68.546875 \nQ 53.21875 62.890625 53.21875 53.421875 \nQ 53.21875 48.921875 51.53125 44.890625 \nQ 49.859375 40.875 45.40625 35.40625 \nQ 44.1875 33.984375 37.640625 27.21875 \nQ 31.109375 20.453125 19.1875 8.296875 \nz\n\" id=\"DejaVuSans-50\"/>\n      </defs>\n      <g transform=\"translate(142.053906 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-50\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_3\">\n     <g id=\"line2d_3\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"210.45625\" xlink:href=\"#mdd5d2cef19\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_3\">\n      <!-- 0 -->\n      <defs>\n       <path d=\"M 31.78125 66.40625 \nQ 24.171875 66.40625 20.328125 58.90625 \nQ 16.5 51.421875 16.5 36.375 \nQ 16.5 21.390625 20.328125 13.890625 \nQ 24.171875 6.390625 31.78125 6.390625 \nQ 39.453125 6.390625 43.28125 13.890625 \nQ 47.125 21.390625 47.125 36.375 \nQ 47.125 51.421875 43.28125 58.90625 \nQ 39.453125 66.40625 31.78125 66.40625 \nz\nM 31.78125 74.21875 \nQ 44.046875 74.21875 50.515625 64.515625 \nQ 56.984375 54.828125 56.984375 36.375 \nQ 56.984375 17.96875 50.515625 8.265625 \nQ 44.046875 -1.421875 31.78125 -1.421875 \nQ 19.53125 -1.421875 13.0625 8.265625 \nQ 6.59375 17.96875 6.59375 36.375 \nQ 6.59375 54.828125 13.0625 64.515625 \nQ 19.53125 74.21875 31.78125 74.21875 \nz\n\" id=\"DejaVuSans-48\"/>\n      </defs>\n      <g transform=\"translate(207.275 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_4\">\n     <!-- x1 -->\n     <defs>\n      <path d=\"M 54.890625 54.6875 \nL 35.109375 28.078125 \nL 55.90625 0 \nL 45.3125 0 \nL 29.390625 21.484375 \nL 13.484375 0 \nL 2.875 0 \nL 24.125 28.609375 \nL 4.6875 54.6875 \nL 15.28125 54.6875 \nL 29.78125 35.203125 \nL 44.28125 54.6875 \nz\n\" id=\"DejaVuSans-120\"/>\n      <path d=\"M 12.40625 8.296875 \nL 28.515625 8.296875 \nL 28.515625 63.921875 \nL 10.984375 60.40625 \nL 10.984375 69.390625 \nL 28.421875 72.90625 \nL 38.28125 72.90625 \nL 38.28125 8.296875 \nL 54.390625 8.296875 \nL 54.390625 0 \nL 12.40625 0 \nz\n\" id=\"DejaVuSans-49\"/>\n     </defs>\n     <g transform=\"translate(134.129687 171.376563)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-120\"/>\n      <use x=\"59.179688\" xlink:href=\"#DejaVuSans-49\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"matplotlib.axis_2\">\n    <g id=\"ytick_1\">\n     <g id=\"line2d_4\">\n      <defs>\n       <path d=\"M 0 0 \nL -3.5 0 \n\" id=\"m2e1bf98a44\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#m2e1bf98a44\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_5\">\n      <!-- −3 -->\n      <defs>\n       <path d=\"M 40.578125 39.3125 \nQ 47.65625 37.796875 51.625 33 \nQ 55.609375 28.21875 55.609375 21.1875 \nQ 55.609375 10.40625 48.1875 4.484375 \nQ 40.765625 -1.421875 27.09375 -1.421875 \nQ 22.515625 -1.421875 17.65625 -0.515625 \nQ 12.796875 0.390625 7.625 2.203125 \nL 7.625 11.71875 \nQ 11.71875 9.328125 16.59375 8.109375 \nQ 21.484375 6.890625 26.8125 6.890625 \nQ 36.078125 6.890625 40.9375 10.546875 \nQ 45.796875 14.203125 45.796875 21.1875 \nQ 45.796875 27.640625 41.28125 31.265625 \nQ 36.765625 34.90625 28.71875 34.90625 \nL 20.21875 34.90625 \nL 20.21875 43.015625 \nL 29.109375 43.015625 \nQ 36.375 43.015625 40.234375 45.921875 \nQ 44.09375 48.828125 44.09375 54.296875 \nQ 44.09375 59.90625 40.109375 62.90625 \nQ 36.140625 65.921875 28.71875 65.921875 \nQ 24.65625 65.921875 20.015625 65.03125 \nQ 15.375 64.15625 9.8125 62.3125 \nL 9.8125 71.09375 \nQ 15.4375 72.65625 20.34375 73.4375 \nQ 25.25 74.21875 29.59375 74.21875 \nQ 40.828125 74.21875 47.359375 69.109375 \nQ 53.90625 64.015625 53.90625 55.328125 \nQ 53.90625 49.265625 50.4375 45.09375 \nQ 46.96875 40.921875 40.578125 39.3125 \nz\n\" id=\"DejaVuSans-51\"/>\n      </defs>\n      <g transform=\"translate(20.878125 146.899219)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-51\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_2\">\n     <g id=\"line2d_5\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#m2e1bf98a44\" y=\"108.253846\"/>\n      </g>\n     </g>\n     <g id=\"text_6\">\n      <!-- −2 -->\n      <g transform=\"translate(20.878125 112.053065)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-50\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_3\">\n     <g id=\"line2d_6\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#m2e1bf98a44\" y=\"73.407692\"/>\n      </g>\n     </g>\n     <g id=\"text_7\">\n      <!-- −1 -->\n      <g transform=\"translate(20.878125 77.206911)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-49\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_4\">\n     <g id=\"line2d_7\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#m2e1bf98a44\" y=\"38.561538\"/>\n      </g>\n     </g>\n     <g id=\"text_8\">\n      <!-- 0 -->\n      <g transform=\"translate(29.257812 42.360757)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_9\">\n     <!-- x2 -->\n     <g transform=\"translate(14.798437 81.290625)rotate(-90)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-120\"/>\n      <use x=\"59.179688\" xlink:href=\"#DejaVuSans-50\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"LineCollection_1\"/>\n   <g id=\"LineCollection_2\">\n    <path clip-path=\"url(#p9d0d9647f7)\" d=\"M 237.920313 104.627963 \nL 237.381801 104.769231 \nL 234.86875 105.394675 \nL 231.817188 106.064793 \nL 228.765625 106.645562 \nL 225.714063 107.136982 \nL 222.6625 107.539053 \nL 219.610938 107.851775 \nL 216.559375 108.075148 \nL 213.507813 108.209172 \nL 210.45625 108.253846 \nL 210.45625 108.253846 \nL 210.45625 108.253846 \nL 207.404688 108.209172 \nL 204.353125 108.075148 \nL 201.301563 107.851775 \nL 198.25 107.539053 \nL 195.198438 107.136982 \nL 192.146875 106.645562 \nL 189.095313 106.064793 \nL 186.04375 105.394675 \nL 183.530699 104.769231 \nL 182.992188 104.627963 \nL 179.940625 103.733264 \nL 176.889063 102.744387 \nL 173.8375 101.661331 \nL 172.861 101.284615 \nL 170.785938 100.438352 \nL 167.734375 99.094286 \nL 164.998491 97.8 \nL 164.682813 97.641608 \nL 161.63125 96.004895 \nL 158.672159 94.315385 \nL 158.579688 94.259181 \nL 155.528125 92.29206 \nL 153.383784 90.830769 \nL 152.476563 90.169894 \nL 149.425 87.82679 \nL 148.829573 87.346154 \nL 146.373438 85.216667 \nL 144.88314 83.861538 \nL 143.321875 82.328308 \nL 141.423125 80.376923 \nL 140.270313 79.08913 \nL 138.387434 76.892308 \nL 137.21875 75.398901 \nL 135.724107 73.407692 \nL 134.167188 71.115182 \nL 133.389338 69.923077 \nL 131.354963 66.438462 \nL 131.115625 65.973846 \nL 129.618632 62.953846 \nL 128.121639 59.469231 \nL 128.064063 59.310839 \nL 126.89892 55.984615 \nL 125.900227 52.5 \nL 125.123466 49.015385 \nL 125.0125 48.318462 \nL 124.584211 45.530769 \nL 124.262993 42.046154 \nL 124.155921 38.561538 \nL 124.262993 35.076923 \nL 124.584211 31.592308 \nL 125.0125 28.804615 \nL 125.123466 28.107692 \nL 125.900227 24.623077 \nL 126.89892 21.138462 \nL 128.064063 17.812238 \nL 128.121639 17.653846 \nL 129.618632 14.169231 \nL 131.115625 11.149231 \nL 131.354963 10.684615 \nL 133.389338 7.2 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_3\">\n    <path clip-path=\"url(#p9d0d9647f7)\" d=\"M 237.920313 134.578531 \nL 234.86875 135.117063 \nL 231.817188 135.592238 \nL 228.765625 136.004056 \nL 227.655966 136.130769 \nL 225.714063 136.344737 \nL 222.6625 136.619838 \nL 219.610938 136.833806 \nL 216.559375 136.98664 \nL 213.507813 137.07834 \nL 210.45625 137.108907 \nL 207.404688 137.07834 \nL 204.353125 136.98664 \nL 201.301563 136.833806 \nL 198.25 136.619838 \nL 195.198438 136.344737 \nL 193.256534 136.130769 \nL 192.146875 136.004056 \nL 189.095313 135.592238 \nL 186.04375 135.117063 \nL 182.992188 134.578531 \nL 179.940625 133.976643 \nL 176.889063 133.311399 \nL 174.102853 132.646154 \nL 173.8375 132.580406 \nL 170.785938 131.758563 \nL 167.734375 130.870972 \nL 164.682813 129.917634 \nL 162.41875 129.161538 \nL 161.63125 128.888235 \nL 158.579688 127.76086 \nL 155.528125 126.565158 \nL 153.383784 125.676923 \nL 152.476563 125.285793 \nL 149.425 123.899058 \nL 146.373438 122.441209 \nL 145.876672 122.192308 \nL 143.321875 120.857774 \nL 140.270313 119.189607 \nL 139.426263 118.707692 \nL 137.21875 117.391282 \nL 134.167188 115.494103 \nL 133.748346 115.223077 \nL 131.115625 113.44025 \nL 128.697406 111.738462 \nL 128.064063 111.271013 \nL 125.0125 108.933771 \nL 124.155921 108.253846 \nL 121.960938 106.422189 \nL 120.047246 104.769231 \nL 118.909375 103.733264 \nL 116.308043 101.284615 \nL 115.857813 100.836593 \nL 112.903125 97.8 \nL 112.80625 97.694406 \nL 109.801635 94.315385 \nL 109.754688 94.259181 \nL 106.976399 90.830769 \nL 106.703125 90.470292 \nL 104.403397 87.346154 \nL 103.651563 86.249145 \nL 102.061312 83.861538 \nL 100.6 81.492 \nL 99.931164 80.376923 \nL 98.008262 76.892308 \nL 97.548438 75.97967 \nL 96.287125 73.407692 \nL 94.741 69.923077 \nL 94.496875 69.308145 \nL 93.387216 66.438462 \nL 92.198295 62.953846 \nL 91.445313 60.407396 \nL 91.174921 59.469231 \nL 90.325119 55.984615 \nL 89.629826 52.5 \nL 89.089043 49.015385 \nL 88.702769 45.530769 \nL 88.471005 42.046154 \nL 88.39375 38.561538 \nL 88.471005 35.076923 \nL 88.702769 31.592308 \nL 89.089043 28.107692 \nL 89.629826 24.623077 \nL 90.325119 21.138462 \nL 91.174921 17.653846 \nL 91.445313 16.71568 \nL 92.198295 14.169231 \nL 93.387216 10.684615 \nL 94.496875 7.814932 \nL 94.741 7.2 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_4\">\n    <path clip-path=\"url(#p9d0d9647f7)\" d=\"M 135.724107 143.1 \nL 134.167188 142.361734 \nL 131.115625 140.855671 \nL 128.697406 139.615385 \nL 128.064063 139.27915 \nL 125.0125 137.597976 \nL 122.442763 136.130769 \nL 121.960938 135.845664 \nL 118.909375 133.976643 \nL 116.808299 132.646154 \nL 115.857813 132.021553 \nL 112.80625 129.950508 \nL 111.679519 129.161538 \nL 109.754688 127.76086 \nL 106.976399 125.676923 \nL 106.703125 125.463579 \nL 103.651563 123.010126 \nL 102.663028 122.192308 \nL 100.6 120.41293 \nL 98.677098 118.707692 \nL 97.548438 117.662308 \nL 94.985125 115.223077 \nL 94.496875 114.736852 \nL 91.564205 111.738462 \nL 91.445313 111.610976 \nL 88.39375 108.253846 \nL 88.39375 108.253846 \nL 85.455208 104.769231 \nL 85.342188 104.627963 \nL 82.731815 101.284615 \nL 82.290625 100.687253 \nL 80.208382 97.8 \nL 79.239063 96.374476 \nL 77.871121 94.315385 \nL 76.1875 91.617618 \nL 75.707479 90.830769 \nL 73.71882 87.346154 \nL 73.135938 86.249145 \nL 71.895192 83.861538 \nL 70.21851 80.376923 \nL 70.084375 80.073913 \nL 68.70625 76.892308 \nL 67.328125 73.407692 \nL 67.032813 72.582389 \nL 66.101283 69.923077 \nL 65.009145 66.438462 \nL 64.045493 62.953846 \nL 63.98125 62.685799 \nL 63.226224 59.469231 \nL 62.534117 55.984615 \nL 61.967848 52.5 \nL 61.527416 49.015385 \nL 61.212822 45.530769 \nL 61.024066 42.046154 \nL 60.961147 38.561538 \nL 61.024066 35.076923 \nL 61.212822 31.592308 \nL 61.527416 28.107692 \nL 61.967848 24.623077 \nL 62.534117 21.138462 \nL 63.226224 17.653846 \nL 63.98125 14.437278 \nL 64.045493 14.169231 \nL 65.009145 10.684615 \nL 66.101283 7.2 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_5\">\n    <path clip-path=\"url(#p9d0d9647f7)\" d=\"M 96.287125 143.1 \nL 94.496875 141.800652 \nL 91.564205 139.615385 \nL 91.445313 139.523684 \nL 88.39375 137.108907 \nL 87.188194 136.130769 \nL 85.342188 134.578531 \nL 83.099473 132.646154 \nL 82.290625 131.922932 \nL 79.274963 129.161538 \nL 79.239063 129.127376 \nL 76.1875 126.155204 \nL 75.707479 125.676923 \nL 73.135938 123.010126 \nL 72.364663 122.192308 \nL 70.084375 119.671522 \nL 69.23125 118.707692 \nL 67.032813 116.11359 \nL 66.294013 115.223077 \nL 63.98125 112.305725 \nL 63.540818 111.738462 \nL 60.961147 108.253846 \nL 60.929688 108.209172 \nL 58.55625 104.769231 \nL 57.878125 103.733264 \nL 56.307024 101.284615 \nL 54.826563 98.845385 \nL 54.204399 97.8 \nL 52.249029 94.315385 \nL 51.775 93.416129 \nL 50.438125 90.830769 \nL 48.7525 87.346154 \nL 48.723438 87.281624 \nL 47.211916 83.861538 \nL 45.785952 80.376923 \nL 45.671875 80.073913 \nL 44.496044 76.892308 \nL 43.320212 73.407692 \nL 42.620313 71.115182 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_6\">\n    <path clip-path=\"url(#p9d0d9647f7)\" d=\"M 67.328125 143.1 \nL 67.032813 142.834224 \nL 63.98125 140.028814 \nL 63.540818 139.615385 \nL 60.929688 137.07834 \nL 59.974148 136.130769 \nL 57.878125 133.976643 \nL 56.609158 132.646154 \nL 54.826563 130.706604 \nL 53.434102 129.161538 \nL 51.775 127.248416 \nL 50.438125 125.676923 \nL 48.723438 123.579042 \nL 47.611186 122.192308 \nL 45.671875 119.671522 \nL 44.943979 118.707692 \nL 42.620313 115.494103 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_7\">\n    <path clip-path=\"url(#p9d0d9647f7)\" d=\"M 43.320212 143.1 \nL 42.620313 142.361734 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_8\"/>\n   <g id=\"line2d_8\">\n    <path clip-path=\"url(#p9d0d9647f7)\" d=\"M 57.878125 108.253846 \nL 88.39375 80.376923 \nL 112.80625 63.650769 \nL 132.33625 53.615077 \nL 147.96025 47.593662 \nL 160.45945 43.980812 \nL 170.45881 41.813103 \nL 178.458298 40.512477 \nL 184.857888 39.732102 \nL 189.977561 39.263876 \nL 194.073299 38.982941 \nL 197.349889 38.81438 \nL 199.971161 38.713243 \nL 202.068179 38.652561 \nL 203.745793 38.616152 \nL 205.087884 38.594307 \nL 206.161558 38.581199 \nL 207.020496 38.573335 \nL 207.707647 38.568616 \nL 208.257367 38.565785 \nL 208.697144 38.564087 \n\" style=\"fill:none;stroke:#ff7f0e;stroke-linecap:square;stroke-width:1.5;\"/>\n    <defs>\n     <path d=\"M 0 3 \nC 0.795609 3 1.55874 2.683901 2.12132 2.12132 \nC 2.683901 1.55874 3 0.795609 3 0 \nC 3 -0.795609 2.683901 -1.55874 2.12132 -2.12132 \nC 1.55874 -2.683901 0.795609 -3 0 -3 \nC -0.795609 -3 -1.55874 -2.683901 -2.12132 -2.12132 \nC -2.683901 -1.55874 -3 -0.795609 -3 0 \nC -3 0.795609 -2.683901 1.55874 -2.12132 2.12132 \nC -1.55874 2.683901 -0.795609 3 0 3 \nz\n\" id=\"m9ab9381aa6\" style=\"stroke:#ff7f0e;\"/>\n    </defs>\n    <g clip-path=\"url(#p9d0d9647f7)\">\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"57.878125\" xlink:href=\"#m9ab9381aa6\" y=\"108.253846\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"88.39375\" xlink:href=\"#m9ab9381aa6\" y=\"80.376923\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"112.80625\" xlink:href=\"#m9ab9381aa6\" y=\"63.650769\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"132.33625\" xlink:href=\"#m9ab9381aa6\" y=\"53.615077\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"147.96025\" xlink:href=\"#m9ab9381aa6\" y=\"47.593662\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"160.45945\" xlink:href=\"#m9ab9381aa6\" y=\"43.980812\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"170.45881\" xlink:href=\"#m9ab9381aa6\" y=\"41.813103\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"178.458298\" xlink:href=\"#m9ab9381aa6\" y=\"40.512477\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"184.857888\" xlink:href=\"#m9ab9381aa6\" y=\"39.732102\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"189.977561\" xlink:href=\"#m9ab9381aa6\" y=\"39.263876\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"194.073299\" xlink:href=\"#m9ab9381aa6\" y=\"38.982941\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"197.349889\" xlink:href=\"#m9ab9381aa6\" y=\"38.81438\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"199.971161\" xlink:href=\"#m9ab9381aa6\" y=\"38.713243\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"202.068179\" xlink:href=\"#m9ab9381aa6\" y=\"38.652561\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"203.745793\" xlink:href=\"#m9ab9381aa6\" y=\"38.616152\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"205.087884\" xlink:href=\"#m9ab9381aa6\" y=\"38.594307\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"206.161558\" xlink:href=\"#m9ab9381aa6\" y=\"38.581199\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"207.020496\" xlink:href=\"#m9ab9381aa6\" y=\"38.573335\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"207.707647\" xlink:href=\"#m9ab9381aa6\" y=\"38.568616\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"208.257367\" xlink:href=\"#m9ab9381aa6\" y=\"38.565785\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"208.697144\" xlink:href=\"#m9ab9381aa6\" y=\"38.564087\"/>\n    </g>\n   </g>\n   <g id=\"patch_3\">\n    <path d=\"M 42.620312 143.1 \nL 42.620312 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_4\">\n    <path d=\"M 237.920313 143.1 \nL 237.920313 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_5\">\n    <path d=\"M 42.620313 143.1 \nL 237.920313 143.1 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_6\">\n    <path d=\"M 42.620313 7.2 \nL 237.920313 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"p9d0d9647f7\">\n   <rect height=\"135.9\" width=\"195.3\" x=\"42.620312\" y=\"7.2\"/>\n  </clipPath>\n </defs>\n</svg>\n"
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "HCMQ7Vd8tWMq",
        "colab_type": "text"
      },
      "source": [
        "### 7.2.4 随机梯度下降"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "vUNnHXuuth6B",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 278
        },
        "outputId": "32071a84-cf82-4002-879f-ff462344235c"
      },
      "source": [
        "def sgd_2d(x1, x2, s1, s2):\n",
        "    return (x1 - eta * (2 * x1 + np.random.normal(0.1)), \n",
        "        x2 - eta * (4 * x2 + np.random.normal(0.1)), 0, 0)\n",
        "\n",
        "show_trace_2d(f_2d, train_2d(sgd_2d))"
      ],
      "execution_count": 11,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "epoch 20, x1 -0.079404, x2 -0.091525\n"
          ],
          "name": "stdout"
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 252x180 with 1 Axes>"
            ],
            "image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (https://matplotlib.org/) -->\n<svg height=\"180.65625pt\" version=\"1.1\" viewBox=\"0 0 245.120313 180.65625\" width=\"245.120313pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n  <style type=\"text/css\">\n*{stroke-linecap:butt;stroke-linejoin:round;}\n  </style>\n </defs>\n <g id=\"figure_1\">\n  <g id=\"patch_1\">\n   <path d=\"M 0 180.65625 \nL 245.120313 180.65625 \nL 245.120313 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n  </g>\n  <g id=\"axes_1\">\n   <g id=\"patch_2\">\n    <path d=\"M 42.620312 143.1 \nL 237.920313 143.1 \nL 237.920313 7.2 \nL 42.620312 7.2 \nz\n\" style=\"fill:#ffffff;\"/>\n   </g>\n   <g id=\"matplotlib.axis_1\">\n    <g id=\"xtick_1\">\n     <g id=\"line2d_1\">\n      <defs>\n       <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"md200768a67\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"88.39375\" xlink:href=\"#md200768a67\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_1\">\n      <!-- −4 -->\n      <defs>\n       <path d=\"M 10.59375 35.5 \nL 73.1875 35.5 \nL 73.1875 27.203125 \nL 10.59375 27.203125 \nz\n\" id=\"DejaVuSans-8722\"/>\n       <path d=\"M 37.796875 64.3125 \nL 12.890625 25.390625 \nL 37.796875 25.390625 \nz\nM 35.203125 72.90625 \nL 47.609375 72.90625 \nL 47.609375 25.390625 \nL 58.015625 25.390625 \nL 58.015625 17.1875 \nL 47.609375 17.1875 \nL 47.609375 0 \nL 37.796875 0 \nL 37.796875 17.1875 \nL 4.890625 17.1875 \nL 4.890625 26.703125 \nz\n\" id=\"DejaVuSans-52\"/>\n      </defs>\n      <g transform=\"translate(81.022656 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-52\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_2\">\n     <g id=\"line2d_2\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"149.425\" xlink:href=\"#md200768a67\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_2\">\n      <!-- −2 -->\n      <defs>\n       <path d=\"M 19.1875 8.296875 \nL 53.609375 8.296875 \nL 53.609375 0 \nL 7.328125 0 \nL 7.328125 8.296875 \nQ 12.9375 14.109375 22.625 23.890625 \nQ 32.328125 33.6875 34.8125 36.53125 \nQ 39.546875 41.84375 41.421875 45.53125 \nQ 43.3125 49.21875 43.3125 52.78125 \nQ 43.3125 58.59375 39.234375 62.25 \nQ 35.15625 65.921875 28.609375 65.921875 \nQ 23.96875 65.921875 18.8125 64.3125 \nQ 13.671875 62.703125 7.8125 59.421875 \nL 7.8125 69.390625 \nQ 13.765625 71.78125 18.9375 73 \nQ 24.125 74.21875 28.421875 74.21875 \nQ 39.75 74.21875 46.484375 68.546875 \nQ 53.21875 62.890625 53.21875 53.421875 \nQ 53.21875 48.921875 51.53125 44.890625 \nQ 49.859375 40.875 45.40625 35.40625 \nQ 44.1875 33.984375 37.640625 27.21875 \nQ 31.109375 20.453125 19.1875 8.296875 \nz\n\" id=\"DejaVuSans-50\"/>\n      </defs>\n      <g transform=\"translate(142.053906 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-50\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"xtick_3\">\n     <g id=\"line2d_3\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"210.45625\" xlink:href=\"#md200768a67\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_3\">\n      <!-- 0 -->\n      <defs>\n       <path d=\"M 31.78125 66.40625 \nQ 24.171875 66.40625 20.328125 58.90625 \nQ 16.5 51.421875 16.5 36.375 \nQ 16.5 21.390625 20.328125 13.890625 \nQ 24.171875 6.390625 31.78125 6.390625 \nQ 39.453125 6.390625 43.28125 13.890625 \nQ 47.125 21.390625 47.125 36.375 \nQ 47.125 51.421875 43.28125 58.90625 \nQ 39.453125 66.40625 31.78125 66.40625 \nz\nM 31.78125 74.21875 \nQ 44.046875 74.21875 50.515625 64.515625 \nQ 56.984375 54.828125 56.984375 36.375 \nQ 56.984375 17.96875 50.515625 8.265625 \nQ 44.046875 -1.421875 31.78125 -1.421875 \nQ 19.53125 -1.421875 13.0625 8.265625 \nQ 6.59375 17.96875 6.59375 36.375 \nQ 6.59375 54.828125 13.0625 64.515625 \nQ 19.53125 74.21875 31.78125 74.21875 \nz\n\" id=\"DejaVuSans-48\"/>\n      </defs>\n      <g transform=\"translate(207.275 157.698438)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_4\">\n     <!-- x1 -->\n     <defs>\n      <path d=\"M 54.890625 54.6875 \nL 35.109375 28.078125 \nL 55.90625 0 \nL 45.3125 0 \nL 29.390625 21.484375 \nL 13.484375 0 \nL 2.875 0 \nL 24.125 28.609375 \nL 4.6875 54.6875 \nL 15.28125 54.6875 \nL 29.78125 35.203125 \nL 44.28125 54.6875 \nz\n\" id=\"DejaVuSans-120\"/>\n      <path d=\"M 12.40625 8.296875 \nL 28.515625 8.296875 \nL 28.515625 63.921875 \nL 10.984375 60.40625 \nL 10.984375 69.390625 \nL 28.421875 72.90625 \nL 38.28125 72.90625 \nL 38.28125 8.296875 \nL 54.390625 8.296875 \nL 54.390625 0 \nL 12.40625 0 \nz\n\" id=\"DejaVuSans-49\"/>\n     </defs>\n     <g transform=\"translate(134.129687 171.376563)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-120\"/>\n      <use x=\"59.179688\" xlink:href=\"#DejaVuSans-49\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"matplotlib.axis_2\">\n    <g id=\"ytick_1\">\n     <g id=\"line2d_4\">\n      <defs>\n       <path d=\"M 0 0 \nL -3.5 0 \n\" id=\"m321c850c96\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n      </defs>\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#m321c850c96\" y=\"143.1\"/>\n      </g>\n     </g>\n     <g id=\"text_5\">\n      <!-- −3 -->\n      <defs>\n       <path d=\"M 40.578125 39.3125 \nQ 47.65625 37.796875 51.625 33 \nQ 55.609375 28.21875 55.609375 21.1875 \nQ 55.609375 10.40625 48.1875 4.484375 \nQ 40.765625 -1.421875 27.09375 -1.421875 \nQ 22.515625 -1.421875 17.65625 -0.515625 \nQ 12.796875 0.390625 7.625 2.203125 \nL 7.625 11.71875 \nQ 11.71875 9.328125 16.59375 8.109375 \nQ 21.484375 6.890625 26.8125 6.890625 \nQ 36.078125 6.890625 40.9375 10.546875 \nQ 45.796875 14.203125 45.796875 21.1875 \nQ 45.796875 27.640625 41.28125 31.265625 \nQ 36.765625 34.90625 28.71875 34.90625 \nL 20.21875 34.90625 \nL 20.21875 43.015625 \nL 29.109375 43.015625 \nQ 36.375 43.015625 40.234375 45.921875 \nQ 44.09375 48.828125 44.09375 54.296875 \nQ 44.09375 59.90625 40.109375 62.90625 \nQ 36.140625 65.921875 28.71875 65.921875 \nQ 24.65625 65.921875 20.015625 65.03125 \nQ 15.375 64.15625 9.8125 62.3125 \nL 9.8125 71.09375 \nQ 15.4375 72.65625 20.34375 73.4375 \nQ 25.25 74.21875 29.59375 74.21875 \nQ 40.828125 74.21875 47.359375 69.109375 \nQ 53.90625 64.015625 53.90625 55.328125 \nQ 53.90625 49.265625 50.4375 45.09375 \nQ 46.96875 40.921875 40.578125 39.3125 \nz\n\" id=\"DejaVuSans-51\"/>\n      </defs>\n      <g transform=\"translate(20.878125 146.899219)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-51\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_2\">\n     <g id=\"line2d_5\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#m321c850c96\" y=\"108.253846\"/>\n      </g>\n     </g>\n     <g id=\"text_6\">\n      <!-- −2 -->\n      <g transform=\"translate(20.878125 112.053065)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-50\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_3\">\n     <g id=\"line2d_6\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#m321c850c96\" y=\"73.407692\"/>\n      </g>\n     </g>\n     <g id=\"text_7\">\n      <!-- −1 -->\n      <g transform=\"translate(20.878125 77.206911)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-8722\"/>\n       <use x=\"83.789062\" xlink:href=\"#DejaVuSans-49\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"ytick_4\">\n     <g id=\"line2d_7\">\n      <g>\n       <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"42.620312\" xlink:href=\"#m321c850c96\" y=\"38.561538\"/>\n      </g>\n     </g>\n     <g id=\"text_8\">\n      <!-- 0 -->\n      <g transform=\"translate(29.257812 42.360757)scale(0.1 -0.1)\">\n       <use xlink:href=\"#DejaVuSans-48\"/>\n      </g>\n     </g>\n    </g>\n    <g id=\"text_9\">\n     <!-- x2 -->\n     <g transform=\"translate(14.798437 81.290625)rotate(-90)scale(0.1 -0.1)\">\n      <use xlink:href=\"#DejaVuSans-120\"/>\n      <use x=\"59.179688\" xlink:href=\"#DejaVuSans-50\"/>\n     </g>\n    </g>\n   </g>\n   <g id=\"LineCollection_1\"/>\n   <g id=\"LineCollection_2\">\n    <path clip-path=\"url(#pfc1ee8c602)\" d=\"M 237.920313 104.627963 \nL 237.381801 104.769231 \nL 234.86875 105.394675 \nL 231.817188 106.064793 \nL 228.765625 106.645562 \nL 225.714063 107.136982 \nL 222.6625 107.539053 \nL 219.610938 107.851775 \nL 216.559375 108.075148 \nL 213.507813 108.209172 \nL 210.45625 108.253846 \nL 210.45625 108.253846 \nL 210.45625 108.253846 \nL 207.404688 108.209172 \nL 204.353125 108.075148 \nL 201.301563 107.851775 \nL 198.25 107.539053 \nL 195.198438 107.136982 \nL 192.146875 106.645562 \nL 189.095313 106.064793 \nL 186.04375 105.394675 \nL 183.530699 104.769231 \nL 182.992188 104.627963 \nL 179.940625 103.733264 \nL 176.889063 102.744387 \nL 173.8375 101.661331 \nL 172.861 101.284615 \nL 170.785938 100.438352 \nL 167.734375 99.094286 \nL 164.998491 97.8 \nL 164.682813 97.641608 \nL 161.63125 96.004895 \nL 158.672159 94.315385 \nL 158.579688 94.259181 \nL 155.528125 92.29206 \nL 153.383784 90.830769 \nL 152.476563 90.169894 \nL 149.425 87.82679 \nL 148.829573 87.346154 \nL 146.373438 85.216667 \nL 144.88314 83.861538 \nL 143.321875 82.328308 \nL 141.423125 80.376923 \nL 140.270313 79.08913 \nL 138.387434 76.892308 \nL 137.21875 75.398901 \nL 135.724107 73.407692 \nL 134.167188 71.115182 \nL 133.389338 69.923077 \nL 131.354963 66.438462 \nL 131.115625 65.973846 \nL 129.618632 62.953846 \nL 128.121639 59.469231 \nL 128.064063 59.310839 \nL 126.89892 55.984615 \nL 125.900227 52.5 \nL 125.123466 49.015385 \nL 125.0125 48.318462 \nL 124.584211 45.530769 \nL 124.262993 42.046154 \nL 124.155921 38.561538 \nL 124.262993 35.076923 \nL 124.584211 31.592308 \nL 125.0125 28.804615 \nL 125.123466 28.107692 \nL 125.900227 24.623077 \nL 126.89892 21.138462 \nL 128.064063 17.812238 \nL 128.121639 17.653846 \nL 129.618632 14.169231 \nL 131.115625 11.149231 \nL 131.354963 10.684615 \nL 133.389338 7.2 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_3\">\n    <path clip-path=\"url(#pfc1ee8c602)\" d=\"M 237.920313 134.578531 \nL 234.86875 135.117063 \nL 231.817188 135.592238 \nL 228.765625 136.004056 \nL 227.655966 136.130769 \nL 225.714063 136.344737 \nL 222.6625 136.619838 \nL 219.610938 136.833806 \nL 216.559375 136.98664 \nL 213.507813 137.07834 \nL 210.45625 137.108907 \nL 207.404688 137.07834 \nL 204.353125 136.98664 \nL 201.301563 136.833806 \nL 198.25 136.619838 \nL 195.198438 136.344737 \nL 193.256534 136.130769 \nL 192.146875 136.004056 \nL 189.095313 135.592238 \nL 186.04375 135.117063 \nL 182.992188 134.578531 \nL 179.940625 133.976643 \nL 176.889063 133.311399 \nL 174.102853 132.646154 \nL 173.8375 132.580406 \nL 170.785938 131.758563 \nL 167.734375 130.870972 \nL 164.682813 129.917634 \nL 162.41875 129.161538 \nL 161.63125 128.888235 \nL 158.579688 127.76086 \nL 155.528125 126.565158 \nL 153.383784 125.676923 \nL 152.476563 125.285793 \nL 149.425 123.899058 \nL 146.373438 122.441209 \nL 145.876672 122.192308 \nL 143.321875 120.857774 \nL 140.270313 119.189607 \nL 139.426263 118.707692 \nL 137.21875 117.391282 \nL 134.167188 115.494103 \nL 133.748346 115.223077 \nL 131.115625 113.44025 \nL 128.697406 111.738462 \nL 128.064063 111.271013 \nL 125.0125 108.933771 \nL 124.155921 108.253846 \nL 121.960938 106.422189 \nL 120.047246 104.769231 \nL 118.909375 103.733264 \nL 116.308043 101.284615 \nL 115.857813 100.836593 \nL 112.903125 97.8 \nL 112.80625 97.694406 \nL 109.801635 94.315385 \nL 109.754688 94.259181 \nL 106.976399 90.830769 \nL 106.703125 90.470292 \nL 104.403397 87.346154 \nL 103.651563 86.249145 \nL 102.061312 83.861538 \nL 100.6 81.492 \nL 99.931164 80.376923 \nL 98.008262 76.892308 \nL 97.548438 75.97967 \nL 96.287125 73.407692 \nL 94.741 69.923077 \nL 94.496875 69.308145 \nL 93.387216 66.438462 \nL 92.198295 62.953846 \nL 91.445313 60.407396 \nL 91.174921 59.469231 \nL 90.325119 55.984615 \nL 89.629826 52.5 \nL 89.089043 49.015385 \nL 88.702769 45.530769 \nL 88.471005 42.046154 \nL 88.39375 38.561538 \nL 88.471005 35.076923 \nL 88.702769 31.592308 \nL 89.089043 28.107692 \nL 89.629826 24.623077 \nL 90.325119 21.138462 \nL 91.174921 17.653846 \nL 91.445313 16.71568 \nL 92.198295 14.169231 \nL 93.387216 10.684615 \nL 94.496875 7.814932 \nL 94.741 7.2 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_4\">\n    <path clip-path=\"url(#pfc1ee8c602)\" d=\"M 135.724107 143.1 \nL 134.167188 142.361734 \nL 131.115625 140.855671 \nL 128.697406 139.615385 \nL 128.064063 139.27915 \nL 125.0125 137.597976 \nL 122.442763 136.130769 \nL 121.960938 135.845664 \nL 118.909375 133.976643 \nL 116.808299 132.646154 \nL 115.857813 132.021553 \nL 112.80625 129.950508 \nL 111.679519 129.161538 \nL 109.754688 127.76086 \nL 106.976399 125.676923 \nL 106.703125 125.463579 \nL 103.651563 123.010126 \nL 102.663028 122.192308 \nL 100.6 120.41293 \nL 98.677098 118.707692 \nL 97.548438 117.662308 \nL 94.985125 115.223077 \nL 94.496875 114.736852 \nL 91.564205 111.738462 \nL 91.445313 111.610976 \nL 88.39375 108.253846 \nL 88.39375 108.253846 \nL 85.455208 104.769231 \nL 85.342188 104.627963 \nL 82.731815 101.284615 \nL 82.290625 100.687253 \nL 80.208382 97.8 \nL 79.239063 96.374476 \nL 77.871121 94.315385 \nL 76.1875 91.617618 \nL 75.707479 90.830769 \nL 73.71882 87.346154 \nL 73.135938 86.249145 \nL 71.895192 83.861538 \nL 70.21851 80.376923 \nL 70.084375 80.073913 \nL 68.70625 76.892308 \nL 67.328125 73.407692 \nL 67.032813 72.582389 \nL 66.101283 69.923077 \nL 65.009145 66.438462 \nL 64.045493 62.953846 \nL 63.98125 62.685799 \nL 63.226224 59.469231 \nL 62.534117 55.984615 \nL 61.967848 52.5 \nL 61.527416 49.015385 \nL 61.212822 45.530769 \nL 61.024066 42.046154 \nL 60.961147 38.561538 \nL 61.024066 35.076923 \nL 61.212822 31.592308 \nL 61.527416 28.107692 \nL 61.967848 24.623077 \nL 62.534117 21.138462 \nL 63.226224 17.653846 \nL 63.98125 14.437278 \nL 64.045493 14.169231 \nL 65.009145 10.684615 \nL 66.101283 7.2 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_5\">\n    <path clip-path=\"url(#pfc1ee8c602)\" d=\"M 96.287125 143.1 \nL 94.496875 141.800652 \nL 91.564205 139.615385 \nL 91.445313 139.523684 \nL 88.39375 137.108907 \nL 87.188194 136.130769 \nL 85.342188 134.578531 \nL 83.099473 132.646154 \nL 82.290625 131.922932 \nL 79.274963 129.161538 \nL 79.239063 129.127376 \nL 76.1875 126.155204 \nL 75.707479 125.676923 \nL 73.135938 123.010126 \nL 72.364663 122.192308 \nL 70.084375 119.671522 \nL 69.23125 118.707692 \nL 67.032813 116.11359 \nL 66.294013 115.223077 \nL 63.98125 112.305725 \nL 63.540818 111.738462 \nL 60.961147 108.253846 \nL 60.929688 108.209172 \nL 58.55625 104.769231 \nL 57.878125 103.733264 \nL 56.307024 101.284615 \nL 54.826563 98.845385 \nL 54.204399 97.8 \nL 52.249029 94.315385 \nL 51.775 93.416129 \nL 50.438125 90.830769 \nL 48.7525 87.346154 \nL 48.723438 87.281624 \nL 47.211916 83.861538 \nL 45.785952 80.376923 \nL 45.671875 80.073913 \nL 44.496044 76.892308 \nL 43.320212 73.407692 \nL 42.620313 71.115182 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_6\">\n    <path clip-path=\"url(#pfc1ee8c602)\" d=\"M 67.328125 143.1 \nL 67.032813 142.834224 \nL 63.98125 140.028814 \nL 63.540818 139.615385 \nL 60.929688 137.07834 \nL 59.974148 136.130769 \nL 57.878125 133.976643 \nL 56.609158 132.646154 \nL 54.826563 130.706604 \nL 53.434102 129.161538 \nL 51.775 127.248416 \nL 50.438125 125.676923 \nL 48.723438 123.579042 \nL 47.611186 122.192308 \nL 45.671875 119.671522 \nL 44.943979 118.707692 \nL 42.620313 115.494103 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_7\">\n    <path clip-path=\"url(#pfc1ee8c602)\" d=\"M 43.320212 143.1 \nL 42.620313 142.361734 \n\" style=\"fill:none;stroke:#1f77b4;stroke-width:1.5;\"/>\n   </g>\n   <g id=\"LineCollection_8\"/>\n   <g id=\"line2d_8\">\n    <path clip-path=\"url(#pfc1ee8c602)\" d=\"M 57.878125 108.253846 \nL 92.148991 83.184407 \nL 117.021196 66.918643 \nL 129.234968 54.563282 \nL 142.535998 45.460562 \nL 154.682613 37.469129 \nL 163.003482 38.612338 \nL 175.178935 33.010121 \nL 181.888769 41.39787 \nL 188.043707 38.320877 \nL 189.947752 41.943644 \nL 191.318492 38.85818 \nL 191.591424 48.842273 \nL 193.753616 40.807481 \nL 191.893577 42.4153 \nL 199.37558 39.392405 \nL 203.154129 43.16496 \nL 204.71952 41.317992 \nL 204.402207 41.86107 \nL 201.926256 43.299457 \nL 208.033172 41.750845 \n\" style=\"fill:none;stroke:#ff7f0e;stroke-linecap:square;stroke-width:1.5;\"/>\n    <defs>\n     <path d=\"M 0 3 \nC 0.795609 3 1.55874 2.683901 2.12132 2.12132 \nC 2.683901 1.55874 3 0.795609 3 0 \nC 3 -0.795609 2.683901 -1.55874 2.12132 -2.12132 \nC 1.55874 -2.683901 0.795609 -3 0 -3 \nC -0.795609 -3 -1.55874 -2.683901 -2.12132 -2.12132 \nC -2.683901 -1.55874 -3 -0.795609 -3 0 \nC -3 0.795609 -2.683901 1.55874 -2.12132 2.12132 \nC -1.55874 2.683901 -0.795609 3 0 3 \nz\n\" id=\"m22e45f01bf\" style=\"stroke:#ff7f0e;\"/>\n    </defs>\n    <g clip-path=\"url(#pfc1ee8c602)\">\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"57.878125\" xlink:href=\"#m22e45f01bf\" y=\"108.253846\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"92.148991\" xlink:href=\"#m22e45f01bf\" y=\"83.184407\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"117.021196\" xlink:href=\"#m22e45f01bf\" y=\"66.918643\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"129.234968\" xlink:href=\"#m22e45f01bf\" y=\"54.563282\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"142.535998\" xlink:href=\"#m22e45f01bf\" y=\"45.460562\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"154.682613\" xlink:href=\"#m22e45f01bf\" y=\"37.469129\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"163.003482\" xlink:href=\"#m22e45f01bf\" y=\"38.612338\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"175.178935\" xlink:href=\"#m22e45f01bf\" y=\"33.010121\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"181.888769\" xlink:href=\"#m22e45f01bf\" y=\"41.39787\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"188.043707\" xlink:href=\"#m22e45f01bf\" y=\"38.320877\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"189.947752\" xlink:href=\"#m22e45f01bf\" y=\"41.943644\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"191.318492\" xlink:href=\"#m22e45f01bf\" y=\"38.85818\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"191.591424\" xlink:href=\"#m22e45f01bf\" y=\"48.842273\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"193.753616\" xlink:href=\"#m22e45f01bf\" y=\"40.807481\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"191.893577\" xlink:href=\"#m22e45f01bf\" y=\"42.4153\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"199.37558\" xlink:href=\"#m22e45f01bf\" y=\"39.392405\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"203.154129\" xlink:href=\"#m22e45f01bf\" y=\"43.16496\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"204.71952\" xlink:href=\"#m22e45f01bf\" y=\"41.317992\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"204.402207\" xlink:href=\"#m22e45f01bf\" y=\"41.86107\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"201.926256\" xlink:href=\"#m22e45f01bf\" y=\"43.299457\"/>\n     <use style=\"fill:#ff7f0e;stroke:#ff7f0e;\" x=\"208.033172\" xlink:href=\"#m22e45f01bf\" y=\"41.750845\"/>\n    </g>\n   </g>\n   <g id=\"patch_3\">\n    <path d=\"M 42.620312 143.1 \nL 42.620312 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_4\">\n    <path d=\"M 237.920313 143.1 \nL 237.920313 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_5\">\n    <path d=\"M 42.620313 143.1 \nL 237.920313 143.1 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n   <g id=\"patch_6\">\n    <path d=\"M 42.620313 7.2 \nL 237.920313 7.2 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;\"/>\n   </g>\n  </g>\n </g>\n <defs>\n  <clipPath id=\"pfc1ee8c602\">\n   <rect height=\"135.9\" width=\"195.3\" x=\"42.620312\" y=\"7.2\"/>\n  </clipPath>\n </defs>\n</svg>\n"
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    }
  ]
}